2 ms·
This behavior might be justifiable - if it were included in the docs. If you want to reduce resource consumption, you could zip the results, or deduplicate the
by pyuser583 5y ago
This behavior might be justifiable - if it were included in the docs.
If you want to reduce resource consumption, you could zip the results, or deduplicate the values using a separate dict.
There’s nothing unPythonic about a function returning mutable values.
A common use for caching is wrapping a call to a remote servicer. If the response is JSON, it’s likely to be mutable.
Nothing weird or edgy about that.