Nick Coghlan added the comment: Updated patch attached. The complexity grew a bit, as it turned out to be useful for the converter functions to be able to tell the difference between top level conversions and recursive invocations. I also realised that:
- the complex number conversion currently allows arbitrarily deep nesting of addition and subtraction - handling this properly made an exception based "Failed to convert" API far more sensible The docstrings are updated, but ast.convert_node is tested only indirectly through the ast.literal_eval tests and the main docs haven't been updated at all. At this point, I'm most interested in feedback from Larry as to whether or not this is helpful to him in implementing argument clinic. ---------- Added file: http://bugs.python.org/file29520/issue17490_ast_literal_eval_converters.diff _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue17490> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com