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
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
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
Benjamin Peterson benja...@python.org added the comment:
I see that it's a problem, but there's nothing we can do about it now, so
you'll have to determine whether it was unicode literals or not based on
compile flags.
--
___
Python tracker
Kay Hayen kayha...@gmx.de added the comment:
Hello Benjamin,
thank you for the response. What do you mean with there is nothing we can do
about it. Is it not possible to add another field indicating the prefix given
to a literal?
BTW: I believe raw strings are also no longer recognizable.
Benjamin Peterson benja...@python.org added the comment:
2010/8/26 Kay Hayen rep...@bugs.python.org:
Kay Hayen kayha...@gmx.de added the comment:
Hello Benjamin,
thank you for the response. What do you mean with there is nothing we can do
about it. Is it not possible to add another field
New submission from Kay Hayen kayha...@gmx.de:
There is no way to decide if a string literal should be non-unicode when the
default has been set to unicode_literals. Please see:
import ast
ast.dump( ast.parse( c = d ) )
Module(body=[Assign(targets=[Name(id='c', ctx=Store())],
Benjamin Peterson benja...@python.org added the comment:
You'll have to look at the compile flags or search the future flags.
--
nosy: +benjamin.peterson
resolution: - wont fix
status: open - closed
___
Python tracker rep...@bugs.python.org