Lines Matching refs:__del__

61     """Create a reference cycle with multiple __del__ methods.
65 cycle have __del__ methods, the gc refuses to guess an order,
240 def __del__(self):
254 def __del__(self):
330 # __del__ methods can trigger collection, make this to happen
336 def __del__(self):
345 # __del__ methods can trigger collection, make this to happen
351 def __del__(self):
403 def __del__(self):
455 def __del__(self):
456 # This __del__ is called by subtype_dealloc().
463 # Now that __del__ is finished, subtype_dealloc will proceed
509 # Boom.__getattr__ (to see whether a and b have __del__ methods), and
513 # whether __del__ exists. This used to (before 2.3b1) crash Python.
538 # cycle until the second time gc checks for __del__. As of 2.3b1,
663 def __del__(self):
718 def __del__(self):
786 def __del__(self):
787 print('__del__ called')
792 self.assertEqual(out.strip(), b'__del__ called')
799 def __del__(self):
800 print('__del__ called')
811 self.assertEqual(out.strip(), b'__del__ called')
816 def __del__(self):
817 print('__del__ called')
825 self.assertEqual(out.strip(), b'__del__ called')
924 def __del__(self):
959 def __del__(self):
996 class Z(A): # resurrecting __del__
997 def __del__(self):
1367 # test_bug1055820c, but uses a __del__ method instead of a weakref
1372 def __del__(self):
1394 # d0 has a __del__ method that references c2wr
1411 # generation) and d0's __del__ triggers. That in turn materializes
1426 self.assertEqual(len(ouch), 1) # else __del__ wasn't invoked
1428 # If __del__ resurrected c2, the instance would be damaged, with an