[issue36788] Add clamp() function to builtins

TheComet report at bugs.python.org
Fri May 3 17:50:00 EDT 2019


New submission from TheComet <alex.murray at gmx.ch>:

It would be nice to have a clamp() builtin in addition to min() and max() so one can type e.g. "clamp(value, 2, 5)" instead of having to type "min(max(value, 5), 2)".

----------
components: Library (Lib)
messages: 341358
nosy: TheComet
priority: normal
severity: normal
status: open
title: Add clamp() function to builtins
type: enhancement

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


More information about the Python-bugs-list mailing list