Message140873
Code:
```
import ast
globalsDict = {}
fAst = ast.FunctionDef(
name="foo",
args=ast.arguments(
args=[], vararg=None, kwarg=None, defaults=[],
kwonlyargs=[], kw_defaults=[]),
body=[], decorator_list=[])
exprAst = ast.Interactive(body=[fAst])
ast.fix_missing_locations(exprAst)
compiled = compile(exprAst, "<foo>", "single")
eval(compiled, globalsDict, globalsDict)
print(globalsDict["foo"])
```
Also CPython 2.6, 2.7, 3.0 and PyPy 1.5 crashes on this. |
|
| Date |
User |
Action |
Args |
| 2011-07-22 13:13:27 | Albert.Zeyer | set | recipients:
+ Albert.Zeyer |
| 2011-07-22 13:13:27 | Albert.Zeyer | set | messageid: <1311340407.01.0.0385021056908.issue12608@psf.upfronthosting.co.za> |
| 2011-07-22 13:13:26 | Albert.Zeyer | link | issue12608 messages |
| 2011-07-22 13:13:26 | Albert.Zeyer | create | |
|