Thursday, April 16, 2015

Who weakrefs the weakrefs?

>>> import weakref
>>> class Target(object): pass
...
>>> t = Target()
>>> r = weakref.ref(t)
>>> r2 = weakref.ref(r)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: cannot create weak reference to 'weakref' object

1 comment:

  1. Notice influencing markdown code, ASOS Discount Code and bound time codes. Cash saving offers and approaches are open ✔️ All coupons are checked and endeavored by today.

    ReplyDelete