On Sun, Jul 5, 2020 at 6:15 AM MRAB <python@mrabarnett.plus.com> wrote:
> clamp(value: Number, minimum: Union[Number, Iterable[Number]], maximum: Union[Number, Iterable[Number]])
 Ss (
What would that return? What if the iterable were two different

If anything, I would accept an iterable for value, and return an iterator.

Min() with an iterable is essential a reduce. Clamp() with an iterable would be 

I think that's overcomplicating it. How often have you actually wanted
that feature?

If you want bounds that are iterables, just use min/max on them first.
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-leave@python.org
Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/QCP347S4JF4COOCCVNALCH7XBNBINF5A/
Code of Conduct: http://python.org/psf/codeofconduct/
Christopher Barker, PhD

Python Language Consulting
  - Teaching
  - Scientific Software Development
  - Desktop GUI and Web Development
  - wxPython, numpy, scipy, Cython