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 serhiy.storchaka
Recipients Valentin.Lorentz, methane, serhiy.storchaka
Date 2017-02-25.10:18:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1488017897.44.0.687651614841.issue29646@psf.upfronthosting.co.za>
In-reply-to
Content
If someone wants to parse a simple expression that may be a string he should use the "eval" mode.

>>> ast.dump(ast.parse("'test'"))
"Module(body=[], docstring='test')"
>>> ast.dump(ast.parse("'test'", mode='eval'))
"Expression(body=Str(s='test'))"
History
Date User Action Args
2017-02-25 10:18:17serhiy.storchakasetrecipients: + serhiy.storchaka, methane, Valentin.Lorentz
2017-02-25 10:18:17serhiy.storchakasetmessageid: <1488017897.44.0.687651614841.issue29646@psf.upfronthosting.co.za>
2017-02-25 10:18:17serhiy.storchakalinkissue29646 messages
2017-02-25 10:18:17serhiy.storchakacreate