New submission from V.E.O:
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):
print param1
param1 = 'new'
fn(param1)
return dummy_wrapper
def dummy():
R. David Murray added the comment:
When you assign a value to param1 it becomes a local variable, thus the error.
You should ask for help on your scoping questions from the python-tutor list or
the general python-list.
--
nosy: +r.david.murray
resolution: - invalid
stage: -