Can "soft references" exist in Python?
<p>In other languages (e.g. Java), object references can be Strong, Weak, Soft or Phantom (<a href="http://weblogs.java.net/blog/enicholas/archive/2006/05/understanding_w.html" rel="nofollow">http://weblogs.java.net/blog/enicholas/archive/2006/05/understanding_w.html</a>).</p>

<p>In Python, references are Strong by default and the WeakRef module allows weak references.</p>

<p>Is it possible to have "soft references" in Python?</p>

<p>In my particular case, I have a cache of objects that are time-consuming to create. Sometimes there may be no references to a cached object, but I don't want to throw the cached object away if I don't have to (i.e. if memory is plentiful).</p>
