PYTHON CODING
- waclaw_koscielniak
- Sep 8
- 1 min read
import weakref
class A: pass
a = A()
r = weakref.ref(a)
print(r() is a)
del a
print(r() is None)
[Running] python3 -u "/Users/name/test/test472.py"
True
True
[Done] exited with code=0 in 0.058 seconds

Try to run it to verify.