On Tue, Jul 7, 2020 at 3:49 AM Christopher Barker <python...@gmail.com> wrote: > > [*] Honestly, while you *could* use clamp() with any comparable objects, I > really don't see a use case for anything non-numerical, but why not? >
Depends how broadly you define "numerical". Is a datetime numerical? It's a reasonable thing to clamp, and in a sense, can be thought of as a number (eg Unix time). But it's certainly not part of the numeric tower. I'd say it's best to let clamp work with anything comparable, and let people figure for themselves what makes sense. ChrisA _______________________________________________ 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/IOIL2KKKLPQ5RJA2U6N5NYY7WY2ADWFC/ Code of Conduct: http://python.org/psf/codeofconduct/