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

But if you've seen decorators in the wild, they almost certainly didn't look like that. There's a short cut for the line that performs the decoration:

0 likes 1 replies

?

Replies

Monty @ The Python Coding Place · Mar 10

You add the `@` symbol followed by the name of the decorator on the line before the function definition. And that's it. This is equivalent to redefining the name of the function to refer to the function returned by the decorator