Python Decorators in 15 Minutes

preview_player
Показать описание
Decorators are an advanced feature of the Python language that allow you to modify the behavior of a function or method without touching its code. This video will teach you why decorators work and how to create your own. It will also walk through a few examples to give you a better idea of where to use Python decorators.

Рекомендации по теме
Комментарии
Автор

Just to recap:

* Every value in Python is an object.
* Functions and classes are objects.
* Function definitions and class definitions are best thought of as special kinds of assignment statements, not as declarations; there are no declarations as such in Python.

Decorators work with classes as well, not just functions. Also worth adding:

* Every object is an instance of a class.

Note this also applies to classes, since they are objects.

lawrencedoliveiro
Автор

I've read about decorators a dozen times. In books, tutorials, documentation of frameworks, etc. This is honestly the first time I actually understand the concept. Best explenation ever. Thanks Tim!

willemvdk
Автор

I looked so many videos, all of them were confusing. But this one just the perfect content I wanted. Thanks for this awesome video

SumanPokhrel
Автор

the best ad for kites. have been seeing the ad everywhere but never wanted it. now i'm liking it

mehregankbi
Автор

Wow this Kite AI thingy is really advanced, it does a darn good impersonation of that Tim fellow.

RagingWhoremoans
Автор

Great explanation. I really appreciated that you gave a few concrete examples where decorators are useful instead of cutting off after explaining the functionality.

garrenmiller
Автор

The best explanation of decorators I've seen so far on youtube!

kristiantorres
Автор

That log decorator is so powerful omg. Thank you for this amazing explanation <3

Dtomper
Автор

hey, it's Tech With Tim :O
I was legit surprised

Sciencedoneright
Автор

When I saw function decorators first time I thoght that it's the easiest theme that I've ever seen, but then I understood how useful and complicated they are. And now, I can say that this tutorial gave me the concept of decorators.

SovsemNeProstoy
Автор

I really loved the way you explained about the decorators. 😊

naveenpemmana
Автор

I watched this video a year ago, created some decorator functions as snippets that I can use later. Now after a year I needed them so I used the snippets but honestly I forgot how they actually work but saved a link to your video. Watched this again and after 15 mins I understand everythingI need. I really appreciate your work Tim, I honestly think that there is absoutely nothing I could add or remove from your content like they go concisely from zero to a decent level of understanding in really short time.

peetk
Автор

I've had problems with decorators for a long time. This video finally solved it. Thanks ;)

Adel-pnup
Автор

I love how to the point this video is to the point. No fluff, you just start explaining. Reminds me of Miziziziz tutorials.

gavintantleff
Автор

This is by far the most explanatory video for decorators I have seen on YouTube. It does not have the view count to match up to how helpful and insightful this video is.

soyaleye
Автор

Absolutely the best, most concise tutorial on decorators - thank you!

mikemace
Автор

Hands down the best explanation of Python decorators in the whole YT!

pawjast
Автор

Been trying to understand decorators, args, and kwargs for years. No clue how you were able to make this work so quickly and easily but I REALLY appreciate you!

thomasdr
Автор

Visualization really helps here. The f1(f) was what sparked my brain there

k_gold
Автор

Tim explains things so well. If he made an advanced python course i would literally "shut up and take my money".

ramonsantiago