Serhiy Storchaka <[email protected]> added the comment:
None can not be ignored in Constant(value=None). [] can not be ignored in
Tuple(elts=[]).
There is also a problem with using ast.dump() with annotate_fields=False:
>>> from ast import *
>>> dump(Raise(cause=Name(id='B', ctx=Load())), annotate_fields=False)
"Raise(Name('B', Load()))"
>>> dump(Raise(Name('B', Load())))
"Raise(exc=Name(id='B', ctx=Load()))"
For Raise(cause=X) it outputs a string which is evaluated to Raise(exc=X).
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue36287>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com