Raymond Hettinger <raymond.hettin...@gmail.com> added the comment:

I concur with Victor.  The proposed API change defeats the purpose of the 
cache.  By design, the intent of the cache is to reuse the previously computed 
value.

I can add something like this to the docs: """In general, the LRU cache should 
only be used when you want to reuse previously computed values.  Accordingly, 
it doesn't make sense to cache functions with side-effects, functions that need 
to create distinct mutable objects on each call, or impure functions such as 
time() or random()."""

----------
assignee:  -> rhettinger
components: +Documentation -Library (Lib)
type: behavior -> 
versions:  -Python 3.4, Python 3.5

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

Reply via email to