#44 Python Tutorial for Beginners | Decorators

///#44 Python Tutorial for Beginners | Decorators

#44 Python Tutorial for Beginners | Decorators

FavoriteLoadingAdd to favorites

source

By |2019-09-03T22:37:34+00:00September 3rd, 2019|Python Video Tutorials|35 Comments

35 Comments

  1. Preetam Patel September 3, 2019 at 10:37 pm - Reply

    I like yr creative way of tutorial

  2. Preetam Patel September 3, 2019 at 10:37 pm - Reply

    Sir aap really mai bahut acchaa padhata ho

  3. Srinidhi Salur September 3, 2019 at 10:37 pm - Reply

    Is it telugu channel… because the name of the channel is "telusko"

  4. Iqbal Haqmal September 3, 2019 at 10:37 pm - Reply

    very nice explanation love it

  5. EPK CUTS September 3, 2019 at 10:37 pm - Reply

    Can't understand

  6. Chris Keo September 3, 2019 at 10:37 pm - Reply

    Horrible video on decorators lol

  7. Richlue Toure September 3, 2019 at 10:37 pm - Reply

    You teach well but you are soo fast 🏎… 😓

  8. Gopal Sharma September 3, 2019 at 10:37 pm - Reply

    is new div permanently changed ?? what if I use put (4,2) now

  9. Nag Arjun September 3, 2019 at 10:37 pm - Reply

    Def div(a,b):
    if a<b:
    a,b=b,a
    print(a/b)

    div(2,4)

    Sir I wanted to know about the difference between the codes an Need of decorators??

  10. akshita garg September 3, 2019 at 10:37 pm - Reply

    Can't get it

  11. Ravi Samal September 3, 2019 at 10:37 pm - Reply

    You are amazing man!!

  12. Mohit Dhiman September 3, 2019 at 10:37 pm - Reply

    sir,why inner function is return after smart div return,it should return first because we defined it first.

  13. Mike Kibet September 3, 2019 at 10:37 pm - Reply

    Well explained, thank you

  14. Irrer Polterer September 3, 2019 at 10:37 pm - Reply

    At 6:25 how does the inner function get the parameters of div? How are a and b given into this construct??

  15. Gavin Balajadia September 3, 2019 at 10:37 pm - Reply

    I thought decorators use the syntax @?

  16. LAL KRISHNA September 3, 2019 at 10:37 pm - Reply

    Hi Navin,

    Firstly Huge thanks fro the amazing videos…..

    Small confusion in the code mentioned by you, Am ai making any mistakes in any lines?

    def div(a, b):

    print(a/b)

    def smart_div(func):

    def inner(a, b):

    if a < b:

    a, b = b, a

    return func(a, b)

    return inner

    obj = smart_div(div)

    div(2, 4)

    Unfortunately am still getting Ans: 0.5

  17. Sujit Tamang September 3, 2019 at 10:37 pm - Reply

    it is called deligates in c#

  18. Manjunatha shenoy September 3, 2019 at 10:37 pm - Reply

    I didn't get. I have confusion, a function inside a function I didn't understood

  19. Rafael de Oliveira September 3, 2019 at 10:37 pm - Reply

    The best explanation I've seen so far. I'm a Python beginner (I work with Javascript).

  20. Thirupathi Patel September 3, 2019 at 10:37 pm - Reply

    Sir I didn't understand wt are decorators

  21. Ishita Kapur September 3, 2019 at 10:37 pm - Reply

    def div(a,b):

    print(a/b)

    def inner(a,b):

    if a<b:

    a,b=b,a

    return div(a,b)

    inner(2,4)

  22. Tooti Leaks September 3, 2019 at 10:37 pm - Reply

    Decorater feature is creepy

  23. Shubham D September 3, 2019 at 10:37 pm - Reply

    It was hard to understand the working , flow of the function.

  24. deepak singh September 3, 2019 at 10:37 pm - Reply

    def decor(func):
    def sir():
    print("===========")
    func()
    print("===========")
    return sir
    @decor

    def quality():
    print("helpful video ")
    print("thank's sir")

    quality()

  25. Rajesh Raut September 3, 2019 at 10:37 pm - Reply

    Still not understand difference between return and print

  26. Zyro Phante September 3, 2019 at 10:37 pm - Reply

    Thank you so much for this video! I've been trying for an hour to wrap my head around decorators (pun intended :P) and this is the first video that's made sense to me.

  27. Sri Anand September 3, 2019 at 10:37 pm - Reply

    I didn't actually get the idea of decorators , what's the use of that another function…

  28. Karthik P September 3, 2019 at 10:37 pm - Reply

    sir i didnt understand y should we write a another inner function in the new one.
    cant we pass the inputs of div directly to smart div

  29. mukesh kacha September 3, 2019 at 10:37 pm - Reply

    i think this is the simple for this..

    def divides(a,b):

    if a<b:

    a,b=b,a

    return a/b

    print(divides(2,6))

  30. Derek Herincx September 3, 2019 at 10:37 pm - Reply

    Amazing!!! Hands down, the best explanation of how decorators work. A coworker of mine uses decorators extensively and I had no clue what/how the @ syntax worked, but this cleared it up for me! Rather than simply show @smart_div, I appreciate you breaking things down logically! You got a new subscriber!

  31. Sneha Baser September 3, 2019 at 10:37 pm - Reply

    I m not understand decorators ..plss make one more video for this

  32. Sown Dharya September 3, 2019 at 10:37 pm - Reply

    Hi
    Possible to take session on metaclass and abstract class in python

  33. Shubham Sharma September 3, 2019 at 10:37 pm - Reply

    SIR I dont understand this decorator concept clearly….actually i understand y we r doing it but not how.

  34. Chris M September 3, 2019 at 10:37 pm - Reply

    You missed the most important part of the whole thing.
    Using the @ syntax before the function we want to wrap is what makes decorators useful.

  35. Risto Vesanto September 3, 2019 at 10:37 pm - Reply

    Best decorator tutorial I have found from youtube. Thank you!

Leave A Comment

*