[issue41408] Add a `clamp` function to the `math` module

Avinash Maddikonda report at bugs.python.org
Mon Jul 27 12:00:01 EDT 2020


Avinash Maddikonda <svasssakavi at gmail.com> added the comment:

So should I delete/reject this now? Because I think it would be more useful than functions like copysign (I mean copysign can be written easily without confusion, but clamp is confusing sometimes as the max function takes minimum and the min of value and the maximum, and yet we have a copysign function but not a clamp built-in or a math module function).

(I'll delete/reject if you guys want me to, np)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41408>
_______________________________________


More information about the Python-bugs-list mailing list