Itay azolay <itayazo...@gmail.com> added the comment:

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 :)

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue41220>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to