diff options
Diffstat (limited to 'Lib/test/crashers/weakref_in_del.py')
-rw-r--r-- | Lib/test/crashers/weakref_in_del.py | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/Lib/test/crashers/weakref_in_del.py b/Lib/test/crashers/weakref_in_del.py index 5c8ca15..3bbcfc3 100644 --- a/Lib/test/crashers/weakref_in_del.py +++ b/Lib/test/crashers/weakref_in_del.py @@ -1,16 +1,16 @@ -import weakref
-
-# http://python.org/sf/1377858
-
-ref = None
-
-def test_weakref_in_del():
- class Target(object):
- def __del__(self):
- global ref
- ref = weakref.ref(self)
-
- w = Target()
-
-if __name__ == '__main__':
- test_weakref_in_del()
+import weakref + +# http://python.org/sf/1377858 + +ref = None + +def test_weakref_in_del(): + class Target(object): + def __del__(self): + global ref + ref = weakref.ref(self) + + w = Target() + +if __name__ == '__main__': + test_weakref_in_del() |