This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Itayazolay
Recipients Itayazolay, bar.harel, fbidu, rhettinger
Date 2020-07-11.10:18:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1594462725.02.0.333797455478.issue41220@roundup.psfhosted.org>
In-reply-to
Content
Hey Felipe! Thanks for stepping in!
I do get your argument. 
However, in my opinion, I try to argue the same thing for max or sorted.
"if one wants to use `sorted`, they should make sure their arguments are comparable".
However, it is not the case, since we do have the `key` argument for sorted or max. 
Also, I don't believe caching equals hashing. 
Maybe from the technical point view, it does, but in reality, One can(and probably will) cache unhashable object, whether we give the option to do so or not.
I think, embedding the key argument in lru_cache, we allow the caller(developer) to solve the caching issue, in a way that is right according to his implementation of the cached function and its arguments.

Unrelated, this is my first feature proposal for python. I want to thank you for taking the time to think and answer with some very good arguments and respect, I truly enjoy this little debate we have here :)
History
Date User Action Args
2020-07-11 10:18:45Itayazolaysetrecipients: + Itayazolay, rhettinger, bar.harel, fbidu
2020-07-11 10:18:45Itayazolaysetmessageid: <1594462725.02.0.333797455478.issue41220@roundup.psfhosted.org>
2020-07-11 10:18:45Itayazolaylinkissue41220 messages
2020-07-11 10:18:44Itayazolaycreate