Movatterモバイル変換


[0]ホーム

URL:


[Python-Dev] #pragmas in Python source code

Fred L. Drake, Jr.fdrake@acm.org
Thu, 13 Apr 2000 10:26:01 -0400 (EDT)


Fredrik Lundh writes: > -- item (3) is for backwards compatibility only.  might be okay to > change this in Py3K, but not before that. > > -- leave the implementation of (1) to 1.7.  for now, assume that > scripts have the default encoding, which means that (2) cannot > happen.  We shouldn't need to change it then; Unicode editing capabilitieswill be pervasive by then, right?  Oh, heck, it might even be legacysupport by then!  ;)  Seriously, I'd hesitate to change any interpretation of defaultencoding until Unicode support is pervasive and fully automatic intools like Notepad, vi/vim, XEmacs, and BBedit/Alpha (or whateverpeople use on MacOS these days).  If I can't use teco on it, we'rebeing too pro-active!  ;) > -- we still need an encoding marker for ascii supersets (how about > <?python encoding="utf-8" version="1.6"?> ;-).  however, it's up to > the tokenizer to detect that one, not the parser.  the parser only > sees unicode strings.  Agreed here.  But shouldn't that be:<?python version="1.6" encoding="utf-8"?>This is war, I tell you, war!  ;)  Now, just need to hack the exec(2) call on all the Unices so that<?python version="..." ...?> is properly recognized and used to runthe scripts properly, obviating the need for those nasty shbanglines!  ;)  -Fred--Fred L. Drake, Jr.  <fdrake at acm.org>Corporation for National Research Initiatives


[8]ページ先頭

©2009-2025 Movatter.jp