Benjamin Peterson <benja...@python.org> added the comment: 2010/8/27 Kay Hayen <rep...@bugs.python.org>: > > Kay Hayen <kayha...@gmx.de> added the comment: > > This is to inform you that I worked around the bug by reading the source file > in question and checking the indicated position. This is currently the only > way to decide if a literal should be unicode or str with unicode_literals > from future imported.
I see. I'm not really sure what you're problem is again because if unicode_literals is in effect, the AST will have decoded the literal into unicode. "Module(body=[ImportFrom(module='__future__', names=[alias(name='unicode_literals', asname=None)], level=0), Expr(value=Tuple(elts=[Str(s=u's'), Str(s=u's')], ctx=Load()))])" ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9690> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com