diff --git a/bot/resources/tags/decorators.md b/bot/resources/tags/decorators.md index ebfb40a104..4dfeb7af94 100644 --- a/bot/resources/tags/decorators.md +++ b/bot/resources/tags/decorators.md @@ -4,7 +4,23 @@ embed: --- A decorator is a function that modifies another function. -Consider the following example of a timer decorator: +Given the decorator +```py +def deco(f): + ... +``` +then the following constructs are functionally equivalent +```py +def tmp_fun(): + ... +fun = deco(tmp_fun) + +@deco +def fun(): + ... +``` + +As an example consider the following example of a timer decorator: ```py >>> import time >>> def timer(f):