On 8/20/2014 8:27 PM, Joseph Martinot-Lagarde wrote:
The pain was even bigger because in addition to the change in underlying
types, the names of the types were not compatible between the python
versions. I often try to write compatible code between python2 and 3,
and I can't use "str" because it has not the same meaning in both
versions, I can not use "unicode" because it disappeared in python3,
And bridge library should have the equivalent of
if 'py3': unicode = str
I can't use "byte" because it doesn't exist in python2.
2.7 (and 2.6?) already has
if 'py2': bytes = str
and I presume bridge libraries targeted before that was added include it
also.
--
Terry Jan Reedy
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com