消息 [366938]
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. |
|
| 日期 |
用户 |
动作 |
参数 |
| 2020-04-21 19:59:22 | brandtbucher | 修改 | recipients:
+ brandtbucher |
| 2020-04-21 19:59:22 | brandtbucher | 修改 | messageid: <1587499162.97.0.267428394248.issue40355@roundup.psfhosted.org> |
| 2020-04-21 19:59:22 | brandtbucher | 链接 | issue40355 messages |
| 2020-04-21 19:59:22 | brandtbucher | 创建 | |
|