R. David Murray added the comment: This works in python3. I'm not sure why the two pythons are different, there's no obvious issue about this being changed in python3, so perhaps it was something that "just happened" while changing other things.
literal_eval is *not* a general expression evaluator, so I'm actually surprised this works in python3...apparently support for + and - is required for evaling complex numbers, but there must be something different about the parse trees generated in python2 vs python3, since python2 literal_eval handles complex numbers fine. I'm not sure this is a bug, but *if* we decide it is something we'd should make work the same in python2 and python3, someone will probably have to invest the time in figuring out what the difference between the two is. ---------- nosy: +r.david.murray _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25335> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com