Portable code: 'from __future__ import unicode_literals' a good idea?
wxjmfauth at gmail.com
wxjmfauth at gmail.com
Tue Dec 16 03:19:05 EST 2014
Le mardi 16 décembre 2014 02:20:52 UTC+1, Ned Batchelder a écrit :
>
> What's wrong with this part of the recommendation?: "or add a u prefix
> to the text literal."
>
The u'' trick in Py2 does not work. Generally
speaking, Python and its characters encoding model
has never work correctly and coherently outside
the ascii world, only a mountain of patches and
workarounds.
In Py3 this kind of behaviour just became more
accute with dramatic consequences.
jmf
More information about the Python-list
mailing list