[Python-Dev] Bytes path support
R. David Murray
rdmurray at bitdance.com
Mon Aug 25 16:32:22 CEST 2014
On Sat, 23 Aug 2014 19:33:06 +0300, Marko Rauhamaa <marko at pacujo.net> wrote:
> "R. David Murray" <rdmurray at bitdance.com>:
>
> > The same problem existed in python2 if your goal was to produce a stream
> > with a consistent encoding, but now python3 treats that as an error.
>
> I have a different interpretation of the situation: as a rule, use byte
> strings in Python3. Text strings are a special corner case for
> applications that have to deal with human languages.
Clearly, then, you are writing unix (or perhaps posix)-only programs.
Also, as has been discussed in this thread previously, any program that
deals with filenames is dealing with human readable languages, even
if posix itself treats the filenames as bytes.
--David
More information about the Python-Dev
mailing list