What is the output of the following? import weakref class Obj: pass obj = Obj() ref = weakref.ref(obj) print(ref() is obj) del obj print(ref())

Python Professional Hard

Python Professional — Hard

What is the output of the following? import weakref class Obj: pass obj = Obj() ref = weakref.ref(obj) print(ref() is obj) del obj print(ref())

Ready to go further?

Related questions