Message159235
| Author |
sbt |
| Recipients |
Yury.Selivanov, asvetlov, benjamin.peterson, ncoghlan, pitrou, sbt |
| Date |
2012年04月24日.23:37:56 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1335310677.08.0.109542213437.issue14369@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
The patch causes crashes. If I define
def cell(o):
def f(): o
return f.__closure__[0]
def f():
a = 1
b = 2
def g():
return a + b
return g
g = f()
then I find
g.__closure__ = None; g() -> crash
g.__closure__ = (cell(3),); g() -> crash
g.__closure__ = (1, 2); g() -> SystemError *
g.__closure__ = (cell(3), cell(4), cell(5)); g() -> returns 7
* SystemError: ..\Objects\cellobject.c:24: bad argument to internal function |
|