Python refers to the enclosing scope as the non-local scope, and there's a `nonlocal` keyword you can use in the inner function to make sure you use the same `counter` in the enclosing scope, and not a new local variable within `wrapper()` And now the error has gone:
0 likes 1 replies
?