Decorator in python | What is Decorator in Python | Advanced Python Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 11 พ.ย. 2024

ความคิดเห็น • 72

  • @Codeyug
    @Codeyug  หลายเดือนก่อน

    Master in Python :- th-cam.com/play/PLI4OVrCFuY543naNBsCaRLrLSxI7MUOzZ.html

  • @codewithkolhar3131
    @codewithkolhar3131 หลายเดือนก่อน +1

    thanks, first time I understood after watching so many videos. keepitup.

    • @Codeyug
      @Codeyug  หลายเดือนก่อน

      Thanks!

  • @khetrabasitechvideo362
    @khetrabasitechvideo362 2 ปีที่แล้ว +4

    Sir me itna khush nhu aap ki videos dekha kar aap ka padhe na ka tarika oo God Dil ko chhu liya ap ne sir

  • @shantanukadukar6496
    @shantanukadukar6496 ปีที่แล้ว +5

    Perfectly explained. Thanks bro, i have gone through many videos but not getting the actual concept but the way you explained is just perfect.

    • @Codeyug
      @Codeyug  ปีที่แล้ว +1

      Keep learning..

  • @Bhupeshpal
    @Bhupeshpal ปีที่แล้ว +1

    Literally I am following you since last week and now everything is getting cleared because whatever you told, you give real life examples in a layman language. So heartily thanks and keep making videos for flask , Django and in cloud side

    • @Codeyug
      @Codeyug  ปีที่แล้ว

      Glad to hear that

  • @clau_X
    @clau_X ปีที่แล้ว +1

    best channel for learning python.. thanks alot

    • @Codeyug
      @Codeyug  ปีที่แล้ว

      You are most welcome

  • @anassohail6576
    @anassohail6576 ปีที่แล้ว +2

    Amazing clearity in explanation

  • @mechxp-pb3en
    @mechxp-pb3en 22 วันที่ผ่านมา

    best video on decorators

  • @Money-em2jz
    @Money-em2jz 4 หลายเดือนก่อน

    Well explained brooooooooooo please please continue don't stop no one is teaching like you

  • @shivammodi1105
    @shivammodi1105 2 หลายเดือนก่อน

    Loved this explanation

  • @kshamapathak4693
    @kshamapathak4693 ปีที่แล้ว +2

    U are just osm to explain the concepts...

    • @Codeyug
      @Codeyug  ปีที่แล้ว +1

      Thanks..please check playlists

  • @dayasagarmittakol3545
    @dayasagarmittakol3545 4 หลายเดือนก่อน +1

    How much long data this Closure function can hold, when decor function called it was having addition function / object address
    Aur ye nested function ka address return Kiya, so decor ka namespace ya function stack frame for destroyed, but when inner function called from somewhere it got address of addition function,
    From where did it get, and how much memory or bytes of data that holds what is the limit, as here these are small examples, but projects it can be huge function..

    • @Codeyug
      @Codeyug  4 หลายเดือนก่อน

      I will come to you on this.

  • @prathameshhiremath1379
    @prathameshhiremath1379 ปีที่แล้ว +1

    Boss Thank you very Much because i search lot of videos but i dint understand from there but after seeing this video all concepts are clear
    sir u have beginners python videos from scratch so i will see i will understand more better
    for this Big thank You 😍😍😍😍🙏🙏🙏🙏🙏
    so i am susbscribing ur channel

    • @Codeyug
      @Codeyug  ปีที่แล้ว

      Thanks and please do share

  • @siddhigolatkar8558
    @siddhigolatkar8558 4 หลายเดือนก่อน +1

    Thank you

  • @Phadi_Vloger
    @Phadi_Vloger 7 หลายเดือนก่อน +1

    I have a question?
    Is it compulsory to use nested function inside decorator function?
    If it isn't then please explain this with an example.

    • @Codeyug
      @Codeyug  7 หลายเดือนก่อน +1

      It is necessary

  • @pahadiraishgamer1777
    @pahadiraishgamer1777 ปีที่แล้ว +5

    Great explanation 👍👌👌

    • @Codeyug
      @Codeyug  ปีที่แล้ว +1

      Thank you nad please check courses in playlist section

  • @Phadi_Vloger
    @Phadi_Vloger 7 หลายเดือนก่อน +1

    Sir i have one more question
    At 7:37 when u call alias printer() then why python interpretor is not get confused with the same name printer function.

    • @Codeyug
      @Codeyug  7 หลายเดือนก่อน +1

      because reassignment happened here. at line 12, i have assigned a new value to printer variable. Now, printer is identifier only for that new value and not the old function.

    • @Phadi_Vloger
      @Phadi_Vloger 7 หลายเดือนก่อน

      @@Codeyug thanku

  • @nandinirm2234
    @nandinirm2234 2 ปีที่แล้ว +1

    Here font size is correct
    Good explanation

    • @Codeyug
      @Codeyug  2 ปีที่แล้ว

      Keep going.. 😃

  • @VarunKulkarni-pk1yg
    @VarunKulkarni-pk1yg 6 หลายเดือนก่อน +1

    You are amazing man

    • @Codeyug
      @Codeyug  6 หลายเดือนก่อน

      Please share my channel with friends!

  • @shelly1067
    @shelly1067 ปีที่แล้ว +1

    very nice explanation, but in case I write print(printer()) , in line number 13, I get "None" along with 3 times welcome in output. Could you please explain. Thanks for the upload!!!

  • @146aarti5
    @146aarti5 ปีที่แล้ว +1

    Superb explanation

    • @Codeyug
      @Codeyug  ปีที่แล้ว

      Thank you 🙂

  • @JustPython
    @JustPython 9 หลายเดือนก่อน +1

    number one video

    • @Codeyug
      @Codeyug  9 หลายเดือนก่อน

      Thanks

  • @pradipchovatiya2579
    @pradipchovatiya2579 ปีที่แล้ว +1

    @13:43 min why iner function call return to decor logically not understand..... please explain..

  • @mr_pavya
    @mr_pavya 2 ปีที่แล้ว +1

    Thanks sir ...nice teaching 👌

    • @Codeyug
      @Codeyug  2 ปีที่แล้ว +1

      Thanks... Oop series going on.. Have a look at playlist

  • @kshamapathak4693
    @kshamapathak4693 ปีที่แล้ว +1

    I want to learn to build projects with my own.. ca u guid plz

    • @Codeyug
      @Codeyug  ปีที่แล้ว +1

      My advice is to learn techs/programming languages first which you are going to use in your project. Some students directly starts building project and they don't have basic knowledge. If they get any error, it becomes very difficult for them to understand what's happening.

    • @kshamapathak4693
      @kshamapathak4693 ปีที่แล้ว

      @@Codeyug Thank you for replying sir.. I want to grow in python and i think i m in learning process too.. completed my course from ur channel as well as from various courses.. but now want to test whether i am ready to make something through that knowledge or not.. so i need ur help. It will be my pleasurer to have ur guidance.

  • @rahimkhizar3301
    @rahimkhizar3301 ปีที่แล้ว +1

    Lots of love bhai maza a gaya

    • @Codeyug
      @Codeyug  ปีที่แล้ว +1

      Thanks ❤ & I have created a small playlist on decorator.. Please check

  • @pranavkulkarni18
    @pranavkulkarni18 8 หลายเดือนก่อน +1

    you are making complicated and confusing code examples. please don't make confusion. great effort from you. nice playlist.

    • @Codeyug
      @Codeyug  8 หลายเดือนก่อน

      Esse simple examples aapko kahi nhi milega. Addition ke example me kya complex and confusing hai ?

    • @PK-wz1qm
      @PK-wz1qm 3 หลายเดือนก่อน +1

      Bro this is not confusing actually it's quite easy if you go to other channels there it becomes difficult to understand.

  • @raveena.sharma
    @raveena.sharma 8 วันที่ผ่านมา +1

    You will be number one soon.

    • @Codeyug
      @Codeyug  8 วันที่ผ่านมา

      @@raveena.sharma Thank you so much raveena..keep going and commenting❤️

  • @vaibhavtandale4233
    @vaibhavtandale4233 2 ปีที่แล้ว +1

    nice teaching sir

    • @Codeyug
      @Codeyug  2 ปีที่แล้ว

      Thank you vaibhav... Keep going.. 👍👍

  • @yuvrajingale6260
    @yuvrajingale6260 2 ปีที่แล้ว

    Sirji your explanation is easy
    i wrote same program of 2 number it shows 'NoneType' object is not callable.
    How do i fix this?

    • @Codeyug
      @Codeyug  2 ปีที่แล้ว

      Program send kro muze on Instagram.. Link about me milega

  • @RamaKrishna-ll8iz
    @RamaKrishna-ll8iz ปีที่แล้ว +1

    @code-yug you are using same function names and variables names . so its confusiong please use different names like below
    def abc(x):
    def mno():
    result=x
    v2=float(input('Enter a number:'))
    result=result+v2
    return result
    return mno
    def addition():
    num1=float(input('Enter first number:'))
    num2=float(input('Enter second number:'))
    result=num1+num2
    return result
    addition=abc(x)
    addition()----------------------its also not giving answer please suggest me

    • @Codeyug
      @Codeyug  ปีที่แล้ว +1

      abc(x)? You should pass addition in abc

  • @adityashrirang2142
    @adityashrirang2142 2 ปีที่แล้ว +2

    Sir staticMethod batayena thoda confusion ho rha

    • @Codeyug
      @Codeyug  2 ปีที่แล้ว

      Please check my oop playlist.. Everything is covered. You can also search 'staticmethod in python codeyug'.

    • @adityashrirang2142
      @adityashrirang2142 2 ปีที่แล้ว

      @@Codeyug thank you sir

  • @erudite600
    @erudite600 2 ปีที่แล้ว

    Sir plz teach python for beginners live classes

    • @Codeyug
      @Codeyug  2 ปีที่แล้ว +1

      Playlist available hai..Live krunga TH-cam pe.. But abhi nahi

    • @erudite600
      @erudite600 2 ปีที่แล้ว

      @@Codeyug ok sir

  • @RamaKrishna-ll8iz
    @RamaKrishna-ll8iz ปีที่แล้ว +1

    def decor(addition):
    def inner():
    result=addition
    v2=float(input('Enter a number:'))
    result=result+v2
    return result
    return inner
    def addition():
    num1=float(input('Enter first number:'))
    num2=float(input('Enter second number:'))
    result=num1+num2
    return result
    addition=decor(addition)
    print(addition()) ------------------------what is wrong here i am not getting answer. Anyone please suggest

    • @Codeyug
      @Codeyug  ปีที่แล้ว

      what is abc? Please go through entire functional programming. Then, only you will clearly understand decorators..

    • @RamaKrishna-ll8iz
      @RamaKrishna-ll8iz ปีที่แล้ว +1

      @@Codeyug got it
      def abc(x):
      def mno():
      result=x()
      v2=float(input('Enter Third number:'))
      result=result+v2
      return result
      return mno
      def addition():
      num1=float(input('Enter first number:'))
      num2=float(input('Enter second number:'))
      result=num1+num2
      return result
      addition=abc(addition)
      print(addition())

    • @Codeyug
      @Codeyug  ปีที่แล้ว

      Great! You can ask any doubt .. happy learning!

  • @surajbhopi6161
    @surajbhopi6161 2 ปีที่แล้ว +1

    Dimag ka dahi karke raha hai is decorator ne...🤣🤣

    • @Codeyug
      @Codeyug  2 ปีที่แล้ว

      After watching this video also..?

    • @surajbhopi6161
      @surajbhopi6161 2 ปีที่แล้ว

      @@Codeyug i got cleared all concepts ur like god for me

  • @sushilbhardwaz4744
    @sushilbhardwaz4744 ปีที่แล้ว +2

    Python kuchh araha hia kuchh nhi bhi

    • @DhavalAhir10
      @DhavalAhir10 ปีที่แล้ว

      Kyu Bhai esa kyu bolra

    • @Codeyug
      @Codeyug  ปีที่แล้ว

      Bro, keep practicing and keep learning. You will become master one day. I will clear your doubts..