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 <>
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.
Date User Action Args
2020-04-21 19:59:22brandtbuchersetrecipients: + brandtbucher
2020-04-21 19:59:22brandtbuchersetmessageid: <>
2020-04-21 19:59:22brandtbucherlinkissue40355 messages
2020-04-21 19:59:22brandtbuchercreate