Benjamin Peterson schrieb: > On Mon, Mar 24, 2008 at 2:38 PM, Christian Heimes <[EMAIL PROTECTED]> wrote: > >> Guido van Rossum schrieb: >>> Thanks; the __future__ import in 2.6 sounds great. >> I'm working on it. However it's not as easy as we first thought. > > What's the problem?
Since 2.4 Python uses the AST tree to access the future flags. But the string unicode literals require the information before the AST tree is created. I solved the problem using some code from Python 2.3. A patch is available at bzr+ssh://[EMAIL PROTECTED]/python/users/christian.heimes/unicode_string_literals It's very rough, hacky but it works. :] from __future__ import unicode_string_literals, print_function print(type("test"), type(u"test"), type(b"test")) <type 'unicode'> <type 'unicode'> <type 'str'> It doesn't work in the interactive shell yet. 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