title: Weak References in python
body: <p>I have been trying to understand how python weak reference lists/dictionaries work. I've read the documentation for it, however I cannot  figure out how they work, and what they can be used for. Could anyone give me a basic example of what they do and an explanation of how they work?</p>
  
  <p><strong>(EDIT)</strong> Using Thomas's code, when i substitute obj for <code>[1,2,3]</code> it throws:</p>
  
  <pre><code>Traceback (most recent call last):
  File "C:/Users/nonya/Desktop/test.py", line 9, in &lt;module&gt;
  r = weakref.ref(obj)
  TypeError: cannot create weak reference to 'list' object
  </code></pre>