Author jaraco
Recipients jaraco, rhettinger, serhiy.storchaka
Date 2015-10-20.21:14:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Indeed. I guess my point about "supported" related to not having tests capturing this requirement or docs stipulating it.

My instinct on the latter question is this - an lru_cache-decorated function is a stateful function. It is mutable, much like a dict or list. If simply copied, the resulting function should have references to the same state. If _deep_ copied, the state (cache) should be similarly deep copied.

Focusing on the deep copy operation, if a cached function is copied, the copy could have additional operations invoked on it and its cache would hit or miss on those calls independently from the original function, and likewise subsequent calls on the original function should not hit on calls unique to the copied function.

I don't have a heavy investment in this expectation. It's also reasonable to me that a deepcopy operation could reuse the same cache or result in an uninitialized one.
Date User Action Args
2015-10-20 21:14:41jaracosetrecipients: + jaraco, rhettinger, serhiy.storchaka
2015-10-20 21:14:41jaracosetmessageid: <>
2015-10-20 21:14:41jaracolinkissue25447 messages
2015-10-20 21:14:41jaracocreate