Message288555
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'))" |
|
Date |
User |
Action |
Args |
2017-02-25 10:18:17 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, methane, Valentin.Lorentz |
2017-02-25 10:18:17 | serhiy.storchaka | set | messageid: <1488017897.44.0.687651614841.issue29646@psf.upfronthosting.co.za> |
2017-02-25 10:18:17 | serhiy.storchaka | link | issue29646 messages |
2017-02-25 10:18:17 | serhiy.storchaka | create | |
|