[issue25447] TypeError invoking deepcopy on lru_cache

Serhiy Storchaka report at bugs.python.org
Tue Oct 20 14:08:26 EDT 2015


Serhiy Storchaka added the comment:

I'm not sure that we can say that deepcopying was not supported for lru_cache. copy.deepcopy() returned the same object, as for immutable objects, but can we consider decorated with lru_cache() function immutable?
 
The question is: if made functools._lru_cache_wrapper to support deepcopy protocol, should the result of copy.deepcopy() share the cache with original?

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25447>
_______________________________________


More information about the Python-bugs-list mailing list