Message366938
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:22 | brandtbucher | set | recipients:
+ brandtbucher |
2020-04-21 19:59:22 | brandtbucher | set | messageid: <1587499162.97.0.267428394248.issue40355@roundup.psfhosted.org> |
2020-04-21 19:59:22 | brandtbucher | link | issue40355 messages |
2020-04-21 19:59:22 | brandtbucher | create | |
|