Message28730
Logged In: YES
user_id=34209
Possibly related is the discovery of free variables (used
when forming closures) and optimized-out codeblocks:
>>> def foo(x):
... def bar():
... if 0:
... print x
... return bar
In 2.4, there is no closure:
>>> foo.func_code.co_cellvars
()
>>> foo(5).func_closure
>>>
In 2.5, there is:
>>> foo.func_code.co_cellvars
('x',)
>>> foo(5).func_closure
(<cell at 0x2b9abf6d7e30: int object at 0x6b6580>,)
(I don't think it's unreasonable to declare the old
behaviour bugged, though :-)
|
|
Date |
User |
Action |
Args |
2007-08-23 14:40:26 | admin | link | issue1501934 messages |
2007-08-23 14:40:26 | admin | create | |
|