> def clamp(x, min, max): > if x < min: > return min > elif x > max: > return max > else: > return x
Si potrebbe disquisire un po' sull'opportunità di togliere else/elif :)
_______________________________________________ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python