[issue35777] mismatched eval() and ast.literal_eval() behavior with unicode_literals

2019-01-21 Thread jez
jez added the comment: I take the point about breaking backward compatibility. The problem, then, is in the `ast` documentation, and may not be confined to Python 2.7 The `literal_eval` doc <https://docs.python.org/2/library/ast.html#ast-helpers> states no more than that the fu

[issue35777] mismatched eval() and ast.literal_eval() behavior with unicode_literals

2019-01-18 Thread Jez Hill
New submission from Jez Hill : Following `from __future__ import unicode_literals` the expression `eval(" 'foo' ")` will return a `unicode` instance. However, using the same input, `ast.literal_eval(" 'foo' ")` will return a `str` instance. Th