This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jez
Recipients jez
Date 2019-01-18.21:26:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1547846800.05.0.589923940496.issue35777@roundup.psfhosted.org>
In-reply-to
Content
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. The caller's preference, that those plain single-quotes should a denote unicode literal, is respected by `eval()` but not by `ast.literal_eval()`.   I propose that `ast.literal_eval()` be made sensitive to this preference, to bring it in line with `eval()`.
History
Date User Action Args
2019-01-18 21:26:43jezsetrecipients: + jez
2019-01-18 21:26:40jezsetmessageid: <1547846800.05.0.589923940496.issue35777@roundup.psfhosted.org>
2019-01-18 21:26:40jezlinkissue35777 messages
2019-01-18 21:26:39jezcreate