Le 30/10/2011 09:00, "Martin v. Löwis" a écrit :
As quoted above, deprecation of the bytes version of the API sounds
fine to me, but isn't this going to run into the usual objections from
the "we need bytes for efficiency" crowd? It's OK with me<wink> to
say "in this restricted area you must convert to Unicode", but is that
going to fly with that constituency?
I don't think this "we need bytes for efficiency" crowd actually exists.
We are talking about file names here. The relevant crowd is the
"we need bytes for correctness", and that crowd focuses primarily on
Unix.
Oh, by the way, it is important to know that Unicode filenames is the
best way to write portable programs with Python 3. On UNIX, since Python
3.1, undecodables filename don't raise Unicode errors: undecodable bytes
are stored as surrogates (see the PEP 383). So even if the computer is
completly misconfigured, it "just works".
On Windows, you must Unicode for filenames for correctness.
Anyway, with Python 3, it's easier to manipulate Unicode strings than
bytes strings.
Martin finally agreed with me, I should hurry to implement my idea! :-)
Victor
_______________________________________________
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