Message140878
| Author |
Albert.Zeyer |
| Recipients |
Albert.Zeyer, vstinner |
| Date |
2011年07月22日.13:52:29 |
| SpamBayes Score |
0.024971828 |
| Marked as misclassified |
No |
| Message-id |
<1311342749.88.0.097321669624.issue12609@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Simplified code:
```
from ast import *
globalsDict = {}
exprAst = Interactive(body=[
FunctionDef(
name=u'foo',
args=arguments(args=[], vararg=None, kwarg=None, defaults=[]),
body=[Pass()],
decorator_list=[])])
fix_missing_locations(exprAst)
compiled = compile(exprAst, "<foo>", "single")
eval(compiled, {}, globalsDict)
f = globalsDict["foo"]
print(f)
```
If I change `name=u'foo'` to `name='foo'`, it works. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2011年07月22日 13:52:29 | Albert.Zeyer | set | recipients:
+ Albert.Zeyer, vstinner |
| 2011年07月22日 13:52:29 | Albert.Zeyer | set | messageid: <1311342749.88.0.097321669624.issue12609@psf.upfronthosting.co.za> |
| 2011年07月22日 13:52:29 | Albert.Zeyer | link | issue12609 messages |
| 2011年07月22日 13:52:29 | Albert.Zeyer | create |
|