Radomir Dopieralski added the comment:

> Umm, that's part of the operational definition of a value based cache
> - it needs to keep things alive, so that if a different instance shows
> up with the same value, it will still get a cache hit.

If it only kept the return value alive, that wouldn't be a problem, it's indeed 
intuitively obvious that it has to do that in order to work. But what many 
people miss to notice is that it also keeps any arguments that were passed to 
the function alive. This is not intuitive, and as I demonstrated with my patch, 
not even necessary, so I think it might be worthwhile to at least mention this 
little implementation quirk.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue19859>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to