This got fixed for classic classes in r60057,

and backported to 2.5.2 in 60056.
This commit is contained in:
Guido van Rossum 2008-01-18 23:05:40 +00:00
parent 0fe6ca4673
commit bf4c7c8c0d
1 changed files with 0 additions and 17 deletions

View File

@ -1,17 +0,0 @@
import weakref
# http://python.org/sf/1377858
# Fixed for new-style classes in 2.5c1.
ref = None
def test_weakref_in_del():
class Target():
def __del__(self):
global ref
ref = weakref.ref(self)
w = Target()
if __name__ == '__main__':
test_weakref_in_del()