• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1'''Test case for "self.__dict__ = self" circular reference bug (#1469629)'''
2
3import gc
4
5class LeakyDict(dict):
6    pass
7
8def leak():
9    ld = LeakyDict()
10    ld.__dict__ = ld
11    del ld
12    gc.collect(); gc.collect(); gc.collect()
13