Serhiy Storchaka added the comment: The Python implementation survives a deepcopy because the Python implementation has a function type, and functions functions are copied as atoms.
Proposed patch just implements __copy__ and __deepcopy__ methods that returns the object itself for the lru_cache object. ---------- stage: resolved -> patch review Added file: http://bugs.python.org/file41435/lru_cache_simple_copy.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25447> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com