19.06.18 22:18, James Edwards пише:
I've only recently looked for these special methods, so that in and of
itself may be the reason these methods aren't exposed, but I could think
of objects that may wish to implement __min__ and __max__ themselves,
for efficiency.
There are two questions.
1. What to do with additional min() and max() arguments: key and default.
2. Is the need of this feature large enough? Will the benefit for
special cases exceed the drawback of increasing implementation
complexity and slowing down common cases?
If supporting of arguments key and default are not needed for you, you
can implement your own functions and use them instead of min() and max().
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/