Skip to content

Update decorator description.#2379

Closed
algmyr wants to merge 2 commits into
python-discord:mainfrom
algmyr:patch-1
Closed

Update decorator description.#2379
algmyr wants to merge 2 commits into
python-discord:mainfrom
algmyr:patch-1

Conversation

@algmyr
Copy link
Copy Markdown

@algmyr algmyr commented Jan 14, 2023

Add description of what a decorator is actually syntactic sugar for.

Add description of what a decorator is actually syntactic sugar for.
@wookie184 wookie184 added the a: tags Related to bot tags label Jan 14, 2023
A decorator is a function that modifies another function.

Consider the following example of a timer decorator:
Given the decorator
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread bot/resources/tags/decorators.md Outdated
@Xithrius
Copy link
Copy Markdown
Contributor

Xithrius commented May 2, 2023

@algmyr Greetings, will you be continuing this PR?

Thanks!

@Xithrius Xithrius added p: 3 - low Low Priority s: waiting for author Waiting for author to address a review or respond to a comment t: enhancement Changes or improvements to existing features labels May 2, 2023
@Xithrius
Copy link
Copy Markdown
Contributor

@algmyr Hey, would you like to continue this PR? I can put it up for grabs, otherwise.

Thanks!

@Xithrius Xithrius self-requested a review September 23, 2023 06:09
@Xithrius
Copy link
Copy Markdown
Contributor

Author hasn't responded to 2 pings. I'm taking over this PR.

@Xithrius Xithrius self-assigned this Nov 25, 2023
@Xithrius Xithrius added s: needs review Author is waiting for someone to review and approve and removed s: waiting for author Waiting for author to address a review or respond to a comment labels Nov 25, 2023
@Xithrius
Copy link
Copy Markdown
Contributor

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!

@Xithrius Xithrius closed this Nov 25, 2023
@Xithrius Xithrius removed the s: needs review Author is waiting for someone to review and approve label Nov 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: tags Related to bot tags p: 3 - low Low Priority t: enhancement Changes or improvements to existing features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants