mirror of https://github.com/mahmoud/boltons.git
fix default arguments of mathutitls.clamp
This commit is contained in:
parent
230b856dc3
commit
4bae3f5589
|
@ -5,7 +5,7 @@ from math import ceil as _ceil, floor as _floor
|
|||
import bisect
|
||||
|
||||
|
||||
def clamp(x, lower=None, upper=None):
|
||||
def clamp(x, lower=float('-inf'), upper=float('inf')):
|
||||
"""Limit a value to a given range.
|
||||
|
||||
Args:
|
||||
|
|
Loading…
Reference in New Issue