This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients benjamin.peterson, brett.cannon, eamanu, levkivskyi, serhiy.storchaka, yselivanov
Date 2019-03-16.06:25:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1552717533.07.0.930372260541.issue36287@roundup.psfhosted.org>
In-reply-to
Content
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).
History
Date User Action Args
2019-03-16 06:25:33serhiy.storchakasetrecipients: + serhiy.storchaka, brett.cannon, benjamin.peterson, yselivanov, levkivskyi, eamanu
2019-03-16 06:25:33serhiy.storchakasetmessageid: <1552717533.07.0.930372260541.issue36287@roundup.psfhosted.org>
2019-03-16 06:25:33serhiy.storchakalinkissue36287 messages
2019-03-16 06:25:32serhiy.storchakacreate