25. Decorators [Python 3 Programming Tutorials]

preview_player
Показать описание
In this tutorial, I explain decorators in a very simple way by going over how to measure execution time of function using decorators. They serve as a wrapper to original function but does a wonderful job of avoiding code duplication and not cluttering original code with additional logic.

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

brother, you are the best online teacher. Thank you very much

vinayak
Автор

Simplest tutorials ever. Thanks Codebasics.

Rafian
Автор

decorators demystified... explained in simple yet beautiful way.. thank you codebasics

ramcharan
Автор

Thanks a ton. Simple and lucid explanation.

deepakpandit
Автор

loved this explanation on decorators. Great Video :)👍

harshvardhanpardeshi
Автор

great video, very easy to understand, already i watched more than10 videos. this is the best for me to understand as a beginner ..thank you..

ygcjayalal
Автор

I finally understood after wandering here and there.
Can you extend this to advance level like decorators inside a decorators? decorators for coroutines object? I would love to learn it from you. Thank you.

shaikhshafeen
Автор

Thanks!!! Very good, strait-forward tutorial

MarcosScalabrin
Автор

@Codebasis, out of curiosity, could we replace *args and **kwargs by parameters?, if so, how could we do it?.

Nearco
Автор

When i am trying to execute a code it showing 0.0 mili second and i am giving range (1 -100).

lokeshdagur
Автор

I had a doubt here wrapper function return result but to which function it's going to return. Can you please clear this doubt.

chandutejareddy
Автор

Thank you for the video! It has been really helpful. Just want to ask one question though. Why time_it method needs to have a nested method, wrapper? what time_it does is to have wrapper function and nothing more. Is there something I missed understanding?

elliekongnamul
Автор

why did you use *args and **kwargs in wrapper ?

brightenglish
Автор

Str((end - start) how is it even possible to write this bcs these two parameters with - in between is not defined

debojitmandal
Автор

With all due respect, I want to thank you for let me compleating basics of Python.Now I am looking to dig deeper.I am looking forward to get used to of Data Engineering/Analytic, so could you refer me which series of your video is good to start(1, 2 or 3 series in row one after one)please.Thank you

skkkks
Автор

Hello Sir


Thanks a lot for your videos.
I have gone through all 25 tutorials of python. What should i read next to learn python ?

gurpreettata
Автор

What is the order of time_it in which it is executing??

pankajchandel
Автор

Can we use any function with decorators?

manojthakuria
Автор

" Can we use decorator inside decorator?" Use cases of it? -- This is my interview question.. please share your view sir on this question..

pandaparas
Автор

Hi thanks a lot for your videos, i am new to this platform(python),
is this 25 sessions of course enough to learn python course completely ?
please help me with your comments .

dkishore