I just learned python @ decorator, it\'s cool, but soon I found my modified code coming out weird problems.
def with_wrapper(param1): def dummy_wrapper(fn):
You assign param1 in the function, which makes param1 a local variable. However, it hasn't been assigned at the point you're printing it, so you get an error. Python doesn't fall back to looking for variables in outer scopes.
param1