Serhiy Storchaka <[email protected]> added the comment:
This doesn't look like Python literal. And if the function accepts a one
particular non-literal the user can except that it accepts other looking
similarly non-literal, that is false.
Actually ast.literal_eval("+True") is error. But
ast.literal_eval(ast.UnaryOp(ast.UAdd(), ast.Constant(True))) is successful by
oversight.
And look at this from other side. What is the benefit of accepting "+True"?
This doesn't make the code simpler.
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue32893>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com