Skip to content Skip to sidebar Skip to footer
Showing posts with the label Weak References

Weakref List In Python

I'm in need of a list of weak references that deletes items when they die. Currently the only w… Read more Weakref List In Python

Python: Which Types Support Weak References?

Code: from weakref import WeakSet se = WeakSet() se.add(1) Output: TypeError: cannot create weak r… Read more Python: Which Types Support Weak References?

Why Doesn't The Weakref Work On This Bound Method?

I have a project where i'm trying to use weakrefs with callbacks, and I don't understand wh… Read more Why Doesn't The Weakref Work On This Bound Method?

Safely Iterating Over Weakkeydictionary And Weakvaluedictionary

The documentation of Python 3.2's weakref module's WeakKeyDictionary and WeakValueDictionar… Read more Safely Iterating Over Weakkeydictionary And Weakvaluedictionary