fork download
  1. import weakref
  2.  
  3. class Foo:
  4. pass
  5.  
  6. bool(weakref.proxy(Foo()))
Runtime error #stdin #stdout #stderr 0.02s 27712KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "./prog.py", line 6, in <module>
ReferenceError: weakly-referenced object no longer exists