"Martin v. Löwis" writes:
 > >> 5) represent all environment variables in Unicode strings,
 > >>    including the ones that currently fail to decode.
 > >>    (then do the same to file names, then drop the byte-oriented
 > >>     file operations again)
 > > 
 > > Please, don't do that! Bytes are not characters!
 > 
 > And environment variables, command line arguments, and file names
 > are not bytes, but characters.

Unfortunately, both POSIX and OS implementation practice (including,
for example, VFAT file systems: NT-derived OSes are not safe!) say
otherwise, and that makes your line of argument extremely dangerous.

Remember, in a fight between human custom and machine programming, the
machine can always win by crashing.  For that reason, bytes must be
the underlying representation, always available, although I think it's
essential to make a text representation easily accessible, and even
the default.  Humans who would rather kvetch about the machine's
breakage than get a useful answer can (and should---problems will be
rare for most usage patterns) use the text representation.  Humans who
want reliability or debuggability, on the other hand, should have
something that cannot be mistaken for text immediately available.


_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to