I searched many tutorials for learning decorators but none of them are able to understand me the concept of decorators, but finally my search is over and I do not need any further exploration of decorators. Thanks a lot for this wonderful explanations ❤❤❤❤
Everyone unique..so maintain your own teaching style... Target is like result do not care I am age 53 yrs. but student not for exam but for self satisfaction..."योग : कर्म 15:17 सुकौशलम्"
learning python day 13 - present sir 00:02 Decorators in Python are like tollbooths on a road. 02:00 Decorators are like a decoration item, applied to functions to perform additional work. 06:11 Decorators in Python allow modifying or extending behavior of functions or methods 08:07 Decorators in Python allow you to add functionality to an existing function. 12:11 Decorators in Python allow you to modify the behavior of a function 14:11 Decorators in Python allow you to wrap a function inside another function. 18:03 Decorators in Python act as wrappers for functions. 19:55 Decorators in Python provide a way to modify or extend the behavior of functions or methods at the time of their definition. 23:31 Decorators in Python can be used to perform advanced code operations with ease. 25:16 Using formatted strings to separate key and value in decorators 28:58 Decorators in Python can be used for customization and memory optimization 30:53 Decorators in Python allow efficient modification of functions. 34:21 Using decorators to implement caching for functions in Python 36:16 Decorators in Python are like tollbooths for functions, adding functionality without changing the original function.
I really enjoy your Python videos on the "Chai Aur Code" channel. Your teaching style is excellent, and your industry-level programming content is incredibly valuable. Please continue making these videos; they're helping us understand real-world frameworks much more easily. We're all here to support your channel's growth and would love to see even more industry-level programming content. Keep up the great work!
learned decorators and really loved it... and indeed it was hard but you explained it so easily, thank you Sir.. and if I got stuck somewhere, I will return to revise this topic
Honestly I like the way you teach the concepts . Specially the question and answers it gives good clarity about the topic and side by side a practical approach is done
Very well explained sir. Loved the video. Such a lucid beautiful explanation can only be delivered when someone have great experience and have dealt with various kind of students. Really loved the video. " Nobody Nobody Nobody does it better ".😍😍
I was worried in 3rd example as how will multiple args will become key for 'cache_value' dictionary. But it's a tuple which is immutable, so it can be key in dictionary. Awesome!
We don't want only gyaan ki baatein, we want to learn as you said (so we are doing, thanks to your amazing content). Itni clarity to content lenses lga kr nahi aati jitni aapke videos dekh kr aajati hai😂😂
kaise internally work karta hai ye samja diya hota to aur behtar hota yaha tak to badiya hi hai aur bahut asanani samaj aa rahi hai aapki ye python series
outstanding churcha about decorators was excellent. I loved it, but I was a bit disappointed that you didn't use the term 'churcha' even once throughout the entire lecture.
ha ye bat to hai jaha sach me kuchh sikh rahe hai us channel ka bahot slow growth ho raha hai but abhi koi hype wali video ban jaye like DSA ya kuchh aisa jo bilkul hype ho aaj kal to waha comments bhi karte hai or subscribe bhi yahi fact hai sir aap content upload kijiye kyu ki mujhe bahot jaruri hai apse padhna or ye bat bakiyo ko bhi lagega jab pata chalega to. ❤❤❤❤💘💘💘💘💘💘❤❤❤❤❤❤
import time def timer(func): def wrapper(*args,**kwargs): #*args=[10] and **kwargs={} start=time.time() func(*args,**kwargs) #calculate_time(10) *args and **kwargs means you are unpacking the both end=time.time() return end-start #result which is approx return wrapper @timer def calculate_time(n): #calculate_time=timer(calculate_time) return wrapper time.sleep(n) a=1+2 return a calculate_time(5) #wrapper(10) print(calculate_time(5)) #value returned from return end-start which is 5 //For reference
cache_values haven't printed in the second call because the print(cache_values) statement is outside the wrapper function. It gets executed only once when the cache decorator is first applied to the long_running_function. After that, the print statement is not re-executed when you call the decorated function. To print the cache values during each function call, move print(cache_values) statement inside the wrapper function.
Thanks for explanation but, why this behave like, those python knows this is decorator function and treat it differently. And if, decorator is function why only func is passed in first function and arguments in inner function.
Bhot accha series raha. keep it up bhaiya thoda request h Django ka playlist laao jldi se placement chl rhe h hamare. problem solve krwte krwte accha lg rha hai.
No sir please DSA in python after this, big O notation, stack queue, link list, tree, heap sir important topics only and in-depth like you always teach us..🙏🙏🙏
I searched many tutorials for learning decorators but none of them are able to understand me the concept of decorators, but finally my search is over and I do not need any further exploration of decorators. Thanks a lot for this wonderful explanations ❤❤❤❤
Agree
Your teaching style is the best for the last banchers also ..this is very helpful..❤
Best explanation of decorators on RUclips...
Decorators in considered a hard topic, but you have explained it so elegantly that now I can write my own decorator easily.
Everyone unique..so maintain your own teaching style...
Target is like result do not care
I am age 53 yrs. but student not for exam but for self satisfaction..."योग : कर्म 15:17 सुकौशलम्"
Subjective mindset 👍
learning python day 13 - present sir
00:02 Decorators in Python are like tollbooths on a road.
02:00 Decorators are like a decoration item, applied to functions to perform additional work.
06:11 Decorators in Python allow modifying or extending behavior of functions or methods
08:07 Decorators in Python allow you to add functionality to an existing function.
12:11 Decorators in Python allow you to modify the behavior of a function
14:11 Decorators in Python allow you to wrap a function inside another function.
18:03 Decorators in Python act as wrappers for functions.
19:55 Decorators in Python provide a way to modify or extend the behavior of functions or methods at the time of their definition.
23:31 Decorators in Python can be used to perform advanced code operations with ease.
25:16 Using formatted strings to separate key and value in decorators
28:58 Decorators in Python can be used for customization and memory optimization
30:53 Decorators in Python allow efficient modification of functions.
34:21 Using decorators to implement caching for functions in Python
36:16 Decorators in Python are like tollbooths for functions, adding functionality without changing the original function.
I really enjoy your Python videos on the "Chai Aur Code" channel. Your teaching style is excellent, and your industry-level programming content is incredibly valuable. Please continue making these videos; they're helping us understand real-world frameworks much more easily. We're all here to support your channel's growth and would love to see even more industry-level programming content. Keep up the great work!
this is the best lecture I have ever found on decorators! Amazing analogy and teaching style
I watched many videos before but the calmness you bring to solve the tough problems for us makes it easy to understand. Thank you so much
I could not express how valuable this teaching material is. I hope you keep on doing this fantastic job in future too
The way you teach is wonderful!!
Thank you soooooo much sir!!🙏🏻🙏🏻
learned decorators and really loved it...
and indeed it was hard but you explained it so easily, thank you Sir.. and if I got stuck somewhere, I will return to revise this topic
Sir i am gonna start gen ai from 14th jun. so i completed this series in 3 days thanks a lot. The new start will be so easy thanks
I personally searched many channels for decorators but mean while i got the best
thank you for you wounderful content
Huh Finally after 3 day of continuous search , i understood decorators . Thanks Bhaiyaa
Honestly I like the way you teach the concepts . Specially the question and answers it gives good clarity about the topic and side by side a practical approach is done
last question was really good
it helped me understanding the concept more .....
THANKS
Well Explained topic I have learned it from so much videos and articles but this one is outstanding.
very unique and pleasant way of teaching , i am glad that i find your channel in a random search , keep uploading videos sir,❤❤
Best ever video on Decorators. Please keep this work coming.
loved the way you have shared the Decorater definition
very unique and pleasant way of teaching , i am glad that i find your channel in a random search , keep uploading videos sir,
You did an awesome job of explaining decorators with examples!
Understood the decorators concept, the examples given here are very much useful, Thank you Sir
Wow! Learned an amazing concept in python and that too so easily. Thank You!
I have never been that confident in Python thank you very much
Really awesome concept and very well explained Hitesh Sir, Thank You🤩
Your teaching style is very calm and thorough
Very well explained sir. Loved the video. Such a lucid beautiful explanation can only be delivered when someone have great experience and have dealt with various kind of students. Really loved the video. " Nobody Nobody Nobody does it better ".😍😍
Awesome explanation on decorators.. understood easily thank you sir ❤
I was worried in 3rd example as how will multiple args will become key for 'cache_value' dictionary.
But it's a tuple which is immutable, so it can be key in dictionary.
Awesome!
Thoda Thoda Samjh aaya hai Decorators...😃😃
Thank you sir 🙏🙏
Best explanation of decorator ever !!
We don't want only gyaan ki baatein, we want to learn as you said (so we are doing, thanks to your amazing content). Itni clarity to content lenses lga kr nahi aati jitni aapke videos dekh kr aajati hai😂😂
Unmatchable , Very well explained advance concepts , Thank you sir 💚💚💚
You are the best teacher
Just three words- Amazing, Amazing and Amazing
kaise internally work karta hai ye samja diya hota to aur behtar hota yaha tak to badiya hi hai aur
bahut asanani samaj aa rahi hai aapki ye python series
Sir I am very serious you are only best teacher in coding ❤
Best teacher in RUclips. Love you sir❤
Tough concept.. finally understood. Thank you
Very well explained,as usual. Thank you for being there 👍
full support from us sir, can't wait to learn django after this
outstanding churcha about decorators was excellent. I loved it, but I was a bit disappointed that you didn't use the term 'churcha' even once throughout the entire lecture.
ha ye bat to hai jaha sach me kuchh sikh rahe hai us channel ka bahot slow growth ho raha hai but abhi koi hype wali video ban jaye like DSA ya kuchh aisa jo bilkul hype ho aaj kal to waha comments bhi karte hai or subscribe bhi yahi fact hai sir aap content upload kijiye kyu ki mujhe bahot jaruri hai apse padhna or ye bat bakiyo ko bhi lagega jab pata chalega to. ❤❤❤❤💘💘💘💘💘💘❤❤❤❤❤❤
Thank you very much sir,aj ja k samgh ayaaa theek se
Sir machine learning deep learning series bhi layeeee
Perfect Explanation on decorators in python
this one of the best series in pytohn
Nice to see your python series .. the most waited one
import time
def timer(func):
def wrapper(*args,**kwargs): #*args=[10] and **kwargs={}
start=time.time()
func(*args,**kwargs) #calculate_time(10) *args and **kwargs means you are unpacking the both
end=time.time()
return end-start #result which is approx
return wrapper
@timer
def calculate_time(n): #calculate_time=timer(calculate_time) return wrapper
time.sleep(n)
a=1+2
return a
calculate_time(5) #wrapper(10)
print(calculate_time(5)) #value returned from return end-start which is 5 //For reference
sir mai late se hi class kiya par achhe se samjh aaya thanku
Sir thank for this fantastic tutorial 🔥🔥🔥
best explanation , i finally understood the topic 👍
Excellent explanation sir 👌
thankyou sir for making python actual easy
Last example was fantastic ❤
Damn that was smooth explaination!! Thanks buddy!
Thank You Sir
For Your heartfelt Efforts
Sir your teaching is best
you are an amazing teacher!!!
sir never stop your effort it helps us a lot
Best explanation of decorators❤
you are best channel ❤❤❤❤❤❤❤
Absolutely perfect video ❤❤
Loved it
i'm learn manythings from this thank u for this video creation
cache_values haven't printed in the second call because the print(cache_values) statement is outside the wrapper function. It gets executed only once when the cache decorator is first applied to the long_running_function. After that, the print statement is not re-executed when you call the decorated function.
To print the cache values during each function call, move print(cache_values) statement inside the wrapper function.
Thanks for explanation but, why this behave like, those python knows this is decorator function and treat it differently.
And if, decorator is function why only func is passed in first function and arguments in inner function.
Bhot accha series raha.
keep it up bhaiya
thoda request h Django ka playlist laao jldi se placement chl rhe h hamare.
problem solve krwte krwte accha lg rha hai.
Very unique way visualize the concept thanks 👍
Glad you like it!
Thank you bhai for this series😘😘
💛great explanation sir
done done sir, The best series of python.
one of the best video on decorator
Best teacher in youtube❤
Amazing problem-solving questions, waiting for django playlist
One word: Awesome!!!!
Loved the simple explanation!!!!!
Good morning sir, A cup of tea ready to bust my energy. ☕☕☕
Very well explained!
Maza aaya decorators padhne main
Bahut majja aya sir❤❤❤
thia is really very amazing knowladge.
Nice dear love your videos from Pakistan
Finally understood decorator thanks
Awesome explantion sir, Toll Booth
toll booth is best analogy cleared my doubts
I like your course🥰🥰🥰🥰
Best explanation
Excellent! Subscribed ✅
best video on decorator
Your js course is just awesome
best python series ever!
This channel make me to finish course
Thank you sir for such informative video
❤❤❤❤❤ best teacher with chai ☕ 😂
Great video on Decorators
No sir please DSA in python after this, big O notation, stack queue, link list, tree, heap sir important topics only and in-depth like you always teach us..🙏🙏🙏
Amazing Content🎉❤
Seems interesting after viewing starting 1st minute
Sir, please aise hi padhao
maza aa gaya