Python's 8-bit cleanness deprecated?

Chris Liechti cliechti at gmx.net
Wed Feb 5 18:35:24 EST 2003


Erik Max Francis <max at alcyone.com> wrote in 
news:3E4195E3.22608E44 at alcyone.com:

> "Anders J. Munch" wrote:
> 
>> Source file encoding has direct consequences for program execution.
>> The shebang and Emacs/vim encoding comments do not.
> 
> That seems to me a distinction without a difference.  The bangpath
> determines (or at least can determine on some operating systems) which

i see some differences...
now, i can strip all comments, the only thing i loose is the option to set 
the X file attribute on Unix like operating systems. (affecting the 
environment)
but if the encoding is stripped it's generating a warning (for non ASCII 
files, affecting the interpreter)
it is the first comment that changes the interpretation of a source file. 
what other magic comment will come in the future?

> interpreter gets run; if you require a certain interpreter version and
> have the bangpath set wrong, your script will bomb.

you can check sys.version and exit gracefuly if you want. however, you 
can't disable this warning within a script.

well, its always a problem to write forwards compatible programs as one can 
never know what the future brings...
some scripts with a division will break in some future release of python 
and this one makes ugly outputs, just a bit earlier. in the end we all have 
to live with the fact that progress has its costs.

chris

-- 
Chris <cliechti at gmx.net>





More information about the Python-list mailing list