Message366938
| 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: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 |
|