Lennart Regebro schrieb:
> Now, before we all get into doomsday mode, there is good news. First
> of all, 2.6a1 already contains a lot of forwards compatibility. And
> with the "from __future__ import print_function", which adds more such
> compatibility. The horrible complete compatibility break that we were
> so worried about might never happen. All that is needed is pretty much
> a from __future__ import unicode_string_literals, and  far as I'm
> concerned we are all set.


How about "from __future__ import py3k_literals" for Python 2.6? The 
future statement turns several literals into Python 3.0 mode:

* '' creates an unicode object instead of a str object
* b'' creates a str object (aka bytes in Python 3.0)
* 1 creates a long instead of an int
* 1L and u'' are invalid

Christian
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to