I know you're "not supposed to" use builtin names as parameters for functions, but sometimes they make the most sense:
def foo(range=(4,5), type="round", len=2):
But if this has been done, and the range
variable has been processed and is no longer needed, how do I get back to the builtin range
and use it inside foo()
?
del range
doesn't restore the builtin:
UnboundLocalError: local variable 'range' referenced before assignment