What are decorators in python

Поделиться
HTML-код
  • Опубликовано: 3 фев 2025

Комментарии • 398

  • @vishalgupta8308
    @vishalgupta8308 11 месяцев назад +25

    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 ❤❤❤❤

  • @Barunghorai-pn4vy
    @Barunghorai-pn4vy 9 месяцев назад +5

    Your teaching style is the best for the last banchers also ..this is very helpful..❤

  • @DeepakVattamwar
    @DeepakVattamwar 9 месяцев назад +3

    Best explanation of decorators on RUclips...

  • @xedose7183
    @xedose7183 10 месяцев назад +4

    Decorators in considered a hard topic, but you have explained it so elegantly that now I can write my own decorator easily.

  • @Shriramkrishnhari
    @Shriramkrishnhari 11 месяцев назад +10

    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 सुकौशलम्"

  • @swarnabhamajumder9561
    @swarnabhamajumder9561 11 месяцев назад +5

    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.

  • @soundgood3840
    @soundgood3840 5 месяцев назад

    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!

  • @sandeepbhagat5685
    @sandeepbhagat5685 3 месяца назад

    this is the best lecture I have ever found on decorators! Amazing analogy and teaching style

  • @priyathukarul5616
    @priyathukarul5616 7 месяцев назад

    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

  • @HimjyotiSarma-s9e
    @HimjyotiSarma-s9e 5 месяцев назад

    I could not express how valuable this teaching material is. I hope you keep on doing this fantastic job in future too

  • @Shivay_1357
    @Shivay_1357 11 месяцев назад +2

    The way you teach is wonderful!!
    Thank you soooooo much sir!!🙏🏻🙏🏻

  • @subratkumarnayak2560
    @subratkumarnayak2560 7 месяцев назад

    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

  • @rupammondal6789
    @rupammondal6789 7 месяцев назад +2

    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

  • @TablaRhyms
    @TablaRhyms 4 месяца назад

    I personally searched many channels for decorators but mean while i got the best
    thank you for you wounderful content

  • @HarshRajCSE
    @HarshRajCSE 25 дней назад

    Huh Finally after 3 day of continuous search , i understood decorators . Thanks Bhaiyaa

  • @shubhamjadhav5024
    @shubhamjadhav5024 7 месяцев назад

    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

  • @prathakgupta3447
    @prathakgupta3447 29 дней назад

    last question was really good
    it helped me understanding the concept more .....
    THANKS

  • @Lee_135s
    @Lee_135s 8 месяцев назад +1

    Well Explained topic I have learned it from so much videos and articles but this one is outstanding.

  • @Ibraheem-xo5ss
    @Ibraheem-xo5ss 6 месяцев назад +1

    very unique and pleasant way of teaching , i am glad that i find your channel in a random search , keep uploading videos sir,❤❤

  • @Vikassharma-eq5xf
    @Vikassharma-eq5xf 5 месяцев назад

    Best ever video on Decorators. Please keep this work coming.

  • @ahmedraza5114
    @ahmedraza5114 2 месяца назад

    loved the way you have shared the Decorater definition

  • @Csengineer-377
    @Csengineer-377 4 месяца назад

    very unique and pleasant way of teaching , i am glad that i find your channel in a random search , keep uploading videos sir,

  • @tomarp127
    @tomarp127 2 месяца назад

    You did an awesome job of explaining decorators with examples!

  • @ArjunSharma-yk5xf
    @ArjunSharma-yk5xf 7 месяцев назад

    Understood the decorators concept, the examples given here are very much useful, Thank you Sir

  • @Debraj-HTC
    @Debraj-HTC 11 месяцев назад +1

    Wow! Learned an amazing concept in python and that too so easily. Thank You!

  • @SobanToor
    @SobanToor 6 месяцев назад

    I have never been that confident in Python thank you very much

  • @dhruvsolanki4473
    @dhruvsolanki4473 4 месяца назад +1

    Really awesome concept and very well explained Hitesh Sir, Thank You🤩

  • @themonkspeaks299
    @themonkspeaks299 8 месяцев назад

    Your teaching style is very calm and thorough

  • @himadriroy7980
    @himadriroy7980 8 месяцев назад

    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 ".😍😍

  • @meenakshimeeen
    @meenakshimeeen 4 месяца назад

    Awesome explanation on decorators.. understood easily thank you sir ❤

  • @sandie_jr
    @sandie_jr 10 месяцев назад

    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!

  • @gulshan7282
    @gulshan7282 10 месяцев назад

    Thoda Thoda Samjh aaya hai Decorators...😃😃
    Thank you sir 🙏🙏

  • @anweshsahoo4268
    @anweshsahoo4268 8 месяцев назад +1

    Best explanation of decorator ever !!

  • @winter_1306
    @winter_1306 11 месяцев назад

    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😂😂

  • @OmPrakash-268
    @OmPrakash-268 11 месяцев назад

    Unmatchable , Very well explained advance concepts , Thank you sir 💚💚💚

  • @Atul_Choubey_M
    @Atul_Choubey_M 5 месяцев назад

    You are the best teacher

  • @adarshjhaxiif-1289
    @adarshjhaxiif-1289 11 месяцев назад

    Just three words- Amazing, Amazing and Amazing

  • @harshpatel6155
    @harshpatel6155 11 месяцев назад

    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

  • @ChandanGiri-lo4cc
    @ChandanGiri-lo4cc 8 месяцев назад

    Sir I am very serious you are only best teacher in coding ❤

  • @samiran__roy
    @samiran__roy 11 месяцев назад

    Best teacher in RUclips. Love you sir❤

  • @ishatiwari3023
    @ishatiwari3023 9 месяцев назад

    Tough concept.. finally understood. Thank you

  • @Alearner-world
    @Alearner-world 11 месяцев назад

    Very well explained,as usual. Thank you for being there 👍

  • @AmitGusai-u7i
    @AmitGusai-u7i 11 месяцев назад +1

    full support from us sir, can't wait to learn django after this

  • @MahbooburrahmanITProfessional
    @MahbooburrahmanITProfessional 6 месяцев назад

    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.

  • @AIVERSE404
    @AIVERSE404 11 месяцев назад

    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. ❤❤❤❤💘💘💘💘💘💘❤❤❤❤❤❤

  • @codevalley9511
    @codevalley9511 5 месяцев назад

    Thank you very much sir,aj ja k samgh ayaaa theek se
    Sir machine learning deep learning series bhi layeeee

  • @sivatej2691
    @sivatej2691 8 месяцев назад

    Perfect Explanation on decorators in python

  • @Airman.programer
    @Airman.programer 5 месяцев назад

    this one of the best series in pytohn

  • @anweshsahoo4268
    @anweshsahoo4268 10 месяцев назад

    Nice to see your python series .. the most waited one

  • @atharvdeshmukh8192
    @atharvdeshmukh8192 2 месяца назад

    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

  • @surajupadhyay1957
    @surajupadhyay1957 10 месяцев назад

    sir mai late se hi class kiya par achhe se samjh aaya thanku

  • @nayonmazumder2106
    @nayonmazumder2106 15 часов назад

    Sir thank for this fantastic tutorial 🔥🔥🔥

  • @harsh4037
    @harsh4037 8 месяцев назад

    best explanation , i finally understood the topic 👍

  • @anirudhnautiyal2336
    @anirudhnautiyal2336 5 дней назад

    Excellent explanation sir 👌

  • @prayagrajshelar5476
    @prayagrajshelar5476 2 месяца назад

    thankyou sir for making python actual easy

  • @MDFAIZANSARI
    @MDFAIZANSARI 10 месяцев назад

    Last example was fantastic ❤

  • @seetheworld3839
    @seetheworld3839 10 месяцев назад

    Damn that was smooth explaination!! Thanks buddy!

  • @tanusreebasuchoudhury9012
    @tanusreebasuchoudhury9012 7 месяцев назад

    Thank You Sir
    For Your heartfelt Efforts

  • @a2002b-o1k
    @a2002b-o1k 9 месяцев назад

    Sir your teaching is best

  • @namansharma4856
    @namansharma4856 9 месяцев назад

    you are an amazing teacher!!!

  • @abdulbaseer9536
    @abdulbaseer9536 11 месяцев назад

    sir never stop your effort it helps us a lot

  • @MousumiDas-hu4gf
    @MousumiDas-hu4gf 10 месяцев назад

    Best explanation of decorators❤

  • @VaibhavDave-r7d
    @VaibhavDave-r7d Месяц назад

    you are best channel ❤❤❤❤❤❤❤

  • @ankitpakhale808
    @ankitpakhale808 10 месяцев назад

    Absolutely perfect video ❤❤
    Loved it

  • @unfilter_point
    @unfilter_point 10 месяцев назад

    i'm learn manythings from this thank u for this video creation

  • @pujanjani813
    @pujanjani813 4 месяца назад +1

    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.

    • @sumansaurabh7772
      @sumansaurabh7772 4 месяца назад

      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.

  • @gauravkumarsingh3467
    @gauravkumarsingh3467 11 месяцев назад

    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.

  • @jaibhagat7441
    @jaibhagat7441 6 месяцев назад

    Very unique way visualize the concept thanks 👍

  • @A.Qureshiata-u-rehman
    @A.Qureshiata-u-rehman 6 месяцев назад

    Thank you bhai for this series😘😘

  • @prakhardeep60
    @prakhardeep60 3 месяца назад

    💛great explanation sir

  • @QuantumXdeveloper
    @QuantumXdeveloper 11 месяцев назад

    done done sir, The best series of python.

  • @praulayar4805
    @praulayar4805 11 месяцев назад

    one of the best video on decorator

  • @nikshadali50
    @nikshadali50 11 месяцев назад

    Best teacher in youtube❤

  • @risingaw1163
    @risingaw1163 9 месяцев назад

    Amazing problem-solving questions, waiting for django playlist

  • @RabiyaShaikh2511
    @RabiyaShaikh2511 4 месяца назад

    One word: Awesome!!!!

  • @PravinUser
    @PravinUser 7 месяцев назад

    Loved the simple explanation!!!!!

  • @ashokmaurya2858
    @ashokmaurya2858 2 месяца назад

    Good morning sir, A cup of tea ready to bust my energy. ☕☕☕

  • @ishatiwari3023
    @ishatiwari3023 9 месяцев назад

    Very well explained!

  • @coder_07
    @coder_07 22 дня назад +1

    Maza aaya decorators padhne main

  • @anandshinde0358
    @anandshinde0358 10 месяцев назад +1

    Bahut majja aya sir❤❤❤

  • @sachindubey4315
    @sachindubey4315 3 месяца назад

    thia is really very amazing knowladge.

  • @abdulhafeez639
    @abdulhafeez639 4 месяца назад

    Nice dear love your videos from Pakistan

  • @raja4win
    @raja4win 3 месяца назад

    Finally understood decorator thanks

  • @himanshkataria6508
    @himanshkataria6508 8 месяцев назад

    Awesome explantion sir, Toll Booth

  • @ahmedraza5114
    @ahmedraza5114 2 месяца назад

    toll booth is best analogy cleared my doubts

  • @codewithsameerkhan
    @codewithsameerkhan 4 месяца назад +1

    I like your course🥰🥰🥰🥰

  • @mdbappihossain2997
    @mdbappihossain2997 Месяц назад +1

    Best explanation

  • @SanketKamble2010
    @SanketKamble2010 3 месяца назад

    Excellent! Subscribed ✅

  • @pruthiraajpanda
    @pruthiraajpanda 9 месяцев назад

    best video on decorator

  • @iitiansurajsingh6602
    @iitiansurajsingh6602 11 месяцев назад

    Your js course is just awesome

  • @tonmoyislam7624
    @tonmoyislam7624 11 месяцев назад

    best python series ever!

  • @minishapatel-li1cg
    @minishapatel-li1cg 5 месяцев назад

    This channel make me to finish course

  • @rushikeshmodi4870
    @rushikeshmodi4870 9 месяцев назад

    Thank you sir for such informative video

  • @mariaali9935
    @mariaali9935 11 месяцев назад

    ❤❤❤❤❤ best teacher with chai ☕ 😂

  • @harshakp06
    @harshakp06 10 месяцев назад

    Great video on Decorators

  • @lalsadevi5413
    @lalsadevi5413 11 месяцев назад

    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..🙏🙏🙏

  • @arjunbhandari1672
    @arjunbhandari1672 6 месяцев назад

    Amazing Content🎉❤

  • @mahipalgunawat698
    @mahipalgunawat698 6 месяцев назад

    Seems interesting after viewing starting 1st minute

  • @traveltigers000usa1
    @traveltigers000usa1 6 месяцев назад

    Sir, please aise hi padhao

  • @Coder-rohits
    @Coder-rohits 5 месяцев назад +1

    maza aa gaya