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 brandtbucher
Recipients brandtbucher
Date 2020-04-21.19:59:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1587499162.97.0.267428394248.issue40355@roundup.psfhosted.org>
In-reply-to
Content
There are several places in the ast module where the use of zip is allowing malformed nodes to have unpaired children silently thrown away. A couple of short examples:

>>> from ast import Constant, Dict, literal_eval, unparse
>>> nasty_dict = Dict(keys=[Constant("I don't have a value!")], values=[])
>>> unparse(nasty_dict)
'{}'
>>> literal_eval(nasty_dict)
{}

I'm currently working on a patch to raise errors instead.
History
Date User Action Args
2020-04-21 19:59:22brandtbuchersetrecipients: + brandtbucher
2020-04-21 19:59:22brandtbuchersetmessageid: <1587499162.97.0.267428394248.issue40355@roundup.psfhosted.org>
2020-04-21 19:59:22brandtbucherlinkissue40355 messages
2020-04-21 19:59:22brandtbuchercreate