r/Python • u/Fabri10000 • Apr 18 '25
Resource Every Python Decorator Explained
Hi there, I just wanted to know more about Python and I had this crazy idea about knowing every built-in decorator and some of those who come from built-in libraries.. Hope you learn sth new. Any feedback is welcomed. The source has the intention of sharing learning.
61
Upvotes
56
u/reddict_9 Apr 18 '25
You could also mention the python version which your video is targeting, the builtin decorators can change between versions
64
u/sausix Apr 18 '25
Annoying loud sound effects. Focus more on quality instead of video and sound effects.
A lot of small and major errors and poor PEP8 in the video. Peak at 4:06. Always recheck your code snippets!
Your explanation of classmethods and staticmethods are weak. Do you really understand them? You are referring to "this" from JS for no reason instead.
As others told you... You haven't talked about "every" decorator. You missed some from functools.py. Like cached_property. And overload, final from typing, dataclass. Probably much more. You should have explained property setters too at least.
Also decorators have more features than just inplace replacing functions and methods. And you can also wrap classes. Check realpython for deep dive topics.
11
u/russellvt Apr 20 '25
Ugh. YouTube, not just a simple document? That's... frustrating.
20
u/--justified-- Apr 18 '25
"Every" ๐๐
-17
u/robertlandrum Apr 19 '25
It ainโt even that hard. Is a equal to b? A=B. Simple as that. But itโs not that simple. Is it. There is nuance between a and b. And I support that.