Kay Hayen <kayha...@gmx.de> added the comment:

You didn't understand. Please tell me, how to decide if this is a unicode 
literal or a str (2.x) literal:

value=Str(s='d')

It's just not possible. When I found a "from __future__ import 
unicode_literals" in the code before, it means I should convert "value.s" to 
unicode fine. But the syntax allows with b"d" to make an exception for some 
strings. Your test "test_compile.py" contains it.

May I ask you to not "close" this bug therefore, as your proposal is not 
feasible? I really need ast.parse() to return different nodes for the string 
literals "d" and b"d" or else I cannot detect the non-unicode literals with 
unicode literals as default.

----------

_______________________________________
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

Reply via email to