Fail when calling configurable functions on module import
It is very easy to make the mistake of calling a configurable when defining a default argument.
In this case bind
does not do anything. Consider failing the example:
In module.py
@configurable
def f(param='default'):
return param
def g(f=f()):
return f
In top level options
from module import f
with f.bind(param='override'):
assert g() == 'override'
Thanks to @sstahl for reporting