Monty @ The Python Coding Place @thepythoncodingplace.com · Mar 15

If you're following along on your computer and you're using an IDE, you probably saw a warning or some squiggly red lines. Let's define a function and decorate it to try out this decorator and see what the problem is

0 likes 1 replies

?

Replies

Monty @ The Python Coding Place · Mar 15

This gives you an error: ``` Traceback (most recent call last): ... print(do_something(5, 9)) ..., line 7, in wrapper if counter < 3: UnboundLocalError: local variable 'counter' referenced before assignment ```