Armin Ronacher <armin.ronac...@active-4.com> added the comment: literal_eval has eval() semantics and not complex() constructor semantics. It accepts what eval() accepts just without arithmetic and unsafe features.
For exmaple "(2 + 4j)" is perfectly fine even though the complex call only supports "2+4j" (no parentheses and whitespace). I commit the fix with the ValueError except Georg suggested. _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue4907> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com