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.
Created on 2011年07月22日 13:49 by Albert.Zeyer, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Messages (1) | |||
|---|---|---|---|
| msg140877 - (view) | Author: Albert Zeyer (Albert.Zeyer) * | Date: 2011年07月22日 13:49 | |
Code:
```
from ast import *
globalsDict = {}
body = [
Assign(targets=[Name(id=u'argc', ctx=Store())],
value=Name(id=u'None', ctx=Load())),
]
exprAst = Interactive(body=[
FunctionDef(
name='foo',
args=arguments(args=[Name(id=u'argc', ctx=Param()), Name(id=u'argv', ctx=Param())],
vararg=None, kwarg=None, defaults=[]),
body=body,
decorator_list=[])])
fix_missing_locations(exprAst)
compiled = compile(exprAst, "<foo>", "single")
eval(compiled, {}, globalsDict)
f = globalsDict["foo"]
print(f)
```
CPython 2.7.1: Fatal Python error: non-string found in code slot
PyPy 1.5: <function foo at 0x0000000103114430>
|
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:20 | admin | set | github: 56819 |
| 2011年07月22日 16:09:50 | benjamin.peterson | set | status: open -> closed resolution: duplicate superseder: SystemError: Objects/codeobject.c:64: bad argument to internal function |
| 2011年07月22日 15:02:43 | pitrou | set | nosy:
+ benjamin.peterson |
| 2011年07月22日 13:49:49 | Albert.Zeyer | create | |