[issue9690] Cannot distinguish b"str" from "str" in ast module.
Kay Hayen
report at bugs.python.org
Fri Aug 27 09:04:12 CEST 2010
Kay Hayen <kayhayen at 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.
It goes like this:
kind = _sources[ filename ][ node.lineno - 1][ node.col_offset ]
if kind != 'b':
value = unicode( node.s )
else:
value = node.s
I don't see how removing the ambgious representation of what I presume is a wanted language construct can be considered a new feature. But that is your decision to make.
Best regards,
Kay Hayen
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9690>
_______________________________________
More information about the Python-bugs-list
mailing list