On 05/07/2020 16:15, Steven D'Aprano wrote:
Perhaps you should reconsider your expectations there. They do different
things because they are different functions with different signatures
and different purposes. It isn't even necessary to use min and max in
the implementation of clamp, in fact it is better not to.

Any "consistency" arguments for clamp versus min/max are weak at best.

Point taken. I don't have a strong opinion on this but I'm curious if others would find it useful to have iterables as acceptable types for bounds. Or maybe even allowing a range instance to be supplied as bounds (I can't think of a use case where I couldn't just pass the bounds of the range instead, but maybe someone else can).
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/UVLZ2JWSH3OND6MJ3TPDFPQMLVSP4NO7/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to