Why prefer != over <> for Python 3.0?
Gabriel Genellina
gagsl-py2 at yahoo.com.ar
Tue Apr 1 05:04:29 EDT 2008
En Tue, 01 Apr 2008 04:15:57 -0300, Jorge Vargas <jorge.vargas at gmail.com>
escribió:
> as for the original question, the point of going unicode is not to
> make code unicode, but to make code's output unicode. thin of print
> calls and templates and comments the world's complexity in languages.
> sadly most english speaking people think unicode is irrelevant because
> ASCII has everything, but their narrow world is what's wrong.
Python 3 is a good step in that direction. Strings are unicode,
identifiers are not restricted to ASCII, and the default source encoding
is not ASCII anymore (but I don't remember which one).
So this is now possible with 3.0:
>>> año = 2008
>>> print("halagüeño")
halagüeño
>>> print("halagüeño".encode("latin1"))
b'halag\xfce\xf1o'
--
Gabriel Genellina
More information about the Python-list
mailing list