We have a lot of input validations on simple scalar inputs which can be handled with a decorator. It'd be less error prune and would simplify the code. Do we think that's a good idea?
Something like
@validate_input('threshold', min=0, max=1, type=[float, int],
err_message='the message goes here')
def f(threshold=0.9):
...