A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2008-December/083998.html below:

[Python-Dev] Python-3.0, unicode, and os.environ

[Python-Dev] Python-3.0, unicode, and os.environStephen J. Turnbull stephen at xemacs.org
Sat Dec 6 06:39:39 CET 2008
"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.


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4