Update decorator description.#2379
Conversation
Add description of what a decorator is actually syntactic sugar for.
| A decorator is a function that modifies another function. | ||
|
|
||
| Consider the following example of a timer decorator: | ||
| Given the decorator |
There was a problem hiding this comment.
I'd rather we'd give the timer example.
decorators are not an easy topic for beginners, and if we're explaining how interpreters translate the syntax & how it executes them, we might as well keep the same example for consistency and also to avoid confusing beginners.
So you would demo the equivalent syntaxes, then you would give the execute example of both of them to demonstrate it even further
|
@algmyr Greetings, will you be continuing this PR? Thanks! |
|
@algmyr Hey, would you like to continue this PR? I can put it up for grabs, otherwise. Thanks! |
|
Author hasn't responded to 2 pings. I'm taking over this PR. |
|
I think the current example is enough for the tag. Also, there was no issue assigned, so next time please get approval from a core developer before proceeding with a PR. Thanks! |
Add description of what a decorator is actually syntactic sugar for.