#58 Python Tutorial for Beginners | Duck Typing

Поділитися
Вставка
  • Опубліковано 28 сер 2018
  • Python Tutorial to learn Python programming with examples
    Complete Python Tutorial for Beginners Playlist : • #1 Python Tutorial for...
    Python Tutorial in Hindi : • #1 Python Tutorial | I...
    Github :- github.com/navinreddy20/Python-
    Editing Monitors :
    amzn.to/2RfKWgL
    amzn.to/2Q665JW
    amzn.to/2OUP21a.
    Check out our website: www.telusko.com
    Follow Telusko on Twitter: / navinreddy20
    Follow on Facebook:
    Telusko : / teluskolearn. .
    Navin Reddy : / navintelusko
    Follow Navin Reddy on Instagram: / navinreddy20
    Subscribe to our other channel:
    Navin Reddy : ua-cam.com/channels/xmk.html...
    Telusko Hindi :
    ua-cam.com/channels/itz.html...
    Donation:
    PayPal Id : navinreddy20
    Patreon : navinreddy20
    www.telusko.com/contactus
  • Наука та технологія

КОМЕНТАРІ • 223

  • @anuradhakumari6123
    @anuradhakumari6123 4 роки тому +60

    Sir, please make one more video on duck typing. This video was too fast. Could nt get the concept. It would be great if u add one more video on the same

    • @chanakyakanakam1950
      @chanakyakanakam1950 3 роки тому +9

      # where the type or the class of an object is less important than the method it defines.
      # don't care about it's type/class, care about what it can do.
      then you will get what it is..

    • @ponnapuarunpraveenkumardwp223
      @ponnapuarunpraveenkumardwp223 2 роки тому +6

      Watch the concept duck typing in
      Pc helper UA-cam channel he will clear all your doubts and he explained it in a perfect manner

    • @rishikeshsawant
      @rishikeshsawant 2 роки тому +1

      @@ponnapuarunpraveenkumardwp223 thanks I understood the topic very well

  • @RiaziMohandesi
    @RiaziMohandesi 5 років тому +97

    Dear Navin, i am a fan of you. I watch your videos about python, and those are very helpful. But, in this case, i think your example is confusing. I watched the video many times but still can not understand the concept of duck typing😕

    • @rabeetamang973
      @rabeetamang973 4 роки тому +8

      If something that..
      Quacks like a duck.
      Fly like a duck.
      Cry like a duck.
      Swim like a duck.
      Then, that is a duck.
      😁😁😁 Duck typing 😁😁😁

    • @netmanng
      @netmanng 4 роки тому +27

      Well, long story short, Duck Typing is the Dependency Injection mechanism for the dynamic languages. In languages such as c#, java you inject your dependency (usually through constructors) as an interface. So that the class you are implementing knows only the behavior of the dependency (function signatures) but not the concrete implementation. In dynamic languages you have Duck Typing which means all relative dependencies should implement the same methods (i.e. execute() in the video). So by this way a single class can use any of these dependencies at any time without knowing anything about them at compile time.
      Real world example: Most humans know what a button is and how to press it. So manufacturers take this into account, they... "duck manufacture" their devices i.e. laptops, desktops, cellphones so that every single device has one power button. So every human knows how to press that button => function power_on(device_of_any_type), and they can use that function to power on everything! ;)

  • @harsiddhisinghdev4650
    @harsiddhisinghdev4650 5 років тому +15

    thankuu sir for the amazing series please continue the series i am learning python from your series....

  • @sunnylayer8369
    @sunnylayer8369 3 роки тому +14

    Initially I was confused with passing an object as an argument but later in the video, I got it❤️

    • @geoafrikana
      @geoafrikana 2 роки тому

      Same here. It all made sense at the end.

  • @pritamsurve1519
    @pritamsurve1519 4 роки тому +4

    you made my quarantine productive.. thank you so much

  • @hatimtekrivlogs2369
    @hatimtekrivlogs2369 5 років тому +5

    the editing is amazing 👌

  • @rammaheshwari3008
    @rammaheshwari3008 5 років тому +5

    Telusko Learning For Life ❤

  • @Amit-kondal
    @Amit-kondal 5 років тому +1

    I have seen all these videos like i am watching movie. Great job sir. Waiting and Excited for more and more videos. Thank you and Best Regards from my side sir..

  • @md.mainuddin8211
    @md.mainuddin8211 5 років тому +2

    Just awesome. Really great explanation. Thanks a lot.

  • @milimishra6447
    @milimishra6447 5 років тому +3

    Thankuuu sir for making such an great effort on making video series on python...keep adding more videos on python... eagerly waiting...:)

  • @mashraf7858
    @mashraf7858 5 років тому +6

    sir keep this beautiful work :)

  • @054_ritesh3
    @054_ritesh3 3 роки тому +3

    Now I have started enjoying python learning 😎😎😎😎😎

  • @samibelattar1847
    @samibelattar1847 2 роки тому +5

    If an object acts like a duck , then this is a duck.
    If the object has the method execute , that is an IDE .
    Thanks sir so much

  • @abhayagarwal5097
    @abhayagarwal5097 4 роки тому +1

    Great example and simple explanation 👍🙂

  • @suhasbrao5170
    @suhasbrao5170 Рік тому

    One of the best Explanations on Duck Typing 👍👌

  • @marvinsosa84
    @marvinsosa84 4 роки тому +1

    Toma tu like!!!! muy buena explicación

  • @lilrana
    @lilrana 5 років тому

    little bit confuse about duck typing but at the end of the video you said java interface that clear my confusion. Thank you sir for your AWESOME videos...

  • @sohamsen7892
    @sohamsen7892 3 роки тому +10

    Sir, kindly accept my regards. I wish I had come across your videos a couple of years earlier. You provide so much in-depth knowledge for free. Unbelievable. I have only one request. Can you also someday come up with a playlist that could help people prepare themselves for coding interviews in big tech companies like Amazon, Facebook, Google, Microsoft, etc. Can you have in it concepts like Dynamic programming, Greedy method, Tree and Graph traversals, two-pointer methods, time complexity, etc??? It would be gold.

  • @aishwaryalaxmiveeramalla739
    @aishwaryalaxmiveeramalla739 4 роки тому

    The example was great but a bit confusing. Finally that was awesome. Loved it ♥.

  • @ghulammuhammad9431
    @ghulammuhammad9431 3 роки тому

    Really awsm....fell in love with your videos and the way you teach....God bless u sir...

  • @koradasrikanth2818
    @koradasrikanth2818 5 років тому +3

    Hi Naveen,
    Such an Amazing series, Worth Appreciating teaching skills. Eagerly waiting for your upcoming videos. Last but not least. Belated Happy Teacher's Day .

  • @lucasmallmanneich
    @lucasmallmanneich 2 роки тому

    Great example, man!

  • @rupshaghosh116
    @rupshaghosh116 2 роки тому

    It was a new concept for me and very nicely explained.

  • @akshaysingh1914
    @akshaysingh1914 4 роки тому +3

    whatever I had learnt in python it just because of you, however I also do some other stuff too after watching your videos , thank you so much sir....with huge respect...!

  • @milindkulkarni3567
    @milindkulkarni3567 5 років тому +4

    Hi Naveen,
    Please make a video on Python Memory management,i want to know difference between JVM and Python memory management.

  • @rishikeshsawant
    @rishikeshsawant 2 роки тому +1

    Telusko is great but Tbh this topic was bit confusing so PC Helper helped me understand this with ease.

  • @chathuramahasen
    @chathuramahasen 3 роки тому

    you always save my day!! Thanking you!!

  • @yashgaur3763
    @yashgaur3763 4 роки тому

    amazing way of explaining!!!!!!

  • @ndroidLover
    @ndroidLover 5 років тому +5

    Hello Sir After this series Plz make videos on python framework Django.......

  • @shreyanshgupta3868
    @shreyanshgupta3868 4 роки тому +1

    Navin.
    (The best
    Best out of Best
    And Many More)
    The Best Teacher ever

  • @freedomoflife4131
    @freedomoflife4131 Рік тому

    Amazing video hahaha, i really love how you educate the audiens, it's great

  • @516deepak
    @516deepak 5 років тому

    First time watch your video its good and easy to understand really . Will check other videos also

  • @SalmanAli-lo6cr
    @SalmanAli-lo6cr 2 роки тому

    thanks sir for a detailed knowledge❤

  • @donha475
    @donha475 4 роки тому

    I just took this for granted haha. But when you think about it... God this is so useful! I have never had to create Interfaces manually so never realized how spoiled I was!

  • @aashishraina2831
    @aashishraina2831 3 роки тому

    Excellent explanation.

  • @prajwaltirpude8582
    @prajwaltirpude8582 2 роки тому

    Good tutorial. Good speed too for someone who have some experience

  • @sushubhatt1590
    @sushubhatt1590 5 років тому +1

    Thanks a lot Navin!! Very well explained..

    • @anshpatidar5842
      @anshpatidar5842 3 роки тому

      @Rossan khatri you can put it in input argument and ask a user to fetch values..which can be changed again and again....MAYBE

  • @dhanasureshadari3482
    @dhanasureshadari3482 5 років тому +1

    sir i am very excited with your explanation
    please try to give updates bit faster
    bacause form know onwords iam waiting for your updates
    thank you for your explanation

  • @cosmoszeeistflight
    @cosmoszeeistflight 5 років тому +3

    I just fall love with ur channel...
    can u plz say about the language *Mathlab*

  • @pawnage3
    @pawnage3 2 роки тому

    Thank you so much!

  • @rajkumar-nx1me
    @rajkumar-nx1me 4 роки тому +4

    sir,would you make another video on duck typing to make the concept clear

  • @ravdeepsingh9000
    @ravdeepsingh9000 3 роки тому +3

    One question?
    If we have to mention "ide" in the syntax, to execute the code..why have we not used "ide" for the codes in the videos previous to this one?

  • @narasimhareddy5124
    @narasimhareddy5124 3 роки тому

    really helpful

  • @ravikanthduvvuri392
    @ravikanthduvvuri392 2 роки тому +1

    Hello sir I got this class after seeing it 5 times everytime I missed one point that is that execute() method is the duck in the code🤦🤦 super sir

  • @hilarybailey4115
    @hilarybailey4115 4 роки тому

    AMAZING!!!

  • @urs_shannu
    @urs_shannu 4 роки тому +4

    Sir, I watched this video many times but I can't get what is the actual use of this. It is somewhat similar to Method Overloading but I can't conclude that it totally...🤔. I understand that whenever we create an object using a class, that particular class method is calling. This is what I understood from this video.

  • @rakeshdurgad9965
    @rakeshdurgad9965 3 роки тому

    I love the editing

  • @sourabhsinha6321
    @sourabhsinha6321 5 років тому

    Thank you sir 😊

  • @ajnbin
    @ajnbin 5 років тому +2

    Best explanation for Duck typing with beautiful example! Keep it up!
    Please more about OOP and how to create a Python program with OOP in mind!!!

  • @princetanwar5694
    @princetanwar5694 4 роки тому

    terusko > 1m subs love you sir congratulations

  • @nidhisoni5540
    @nidhisoni5540 2 місяці тому

    first time Duck typing is clear to me

  • @namratasurve6708
    @namratasurve6708 5 років тому +38

    i have seen all python series till now but I found it a bit confusing

    • @SantoshRaj-hx7rx
      @SantoshRaj-hx7rx 5 років тому +5

      @Namrata, Duck type is "type of object" is defined during the run time of the program no need to define explicitly before being used in program.

  • @UDAYKUMAR-zk2vt
    @UDAYKUMAR-zk2vt 5 років тому

    thank you sir,

  • @David-rm6uz
    @David-rm6uz 8 місяців тому

    Thank you sir

  • @ashokkumar-ln2en
    @ashokkumar-ln2en 5 років тому +6

    I am glad that he only respond to the comments which were on his favour .
    What about the doubts comment?

  • @sujitsen1766
    @sujitsen1766 5 років тому +1

    Sir plz make videos on Visual Python and GUI using Tkinter\Tcl

  • @safwansahil1127
    @safwansahil1127 2 роки тому +1

    Sir, please make one more video on duck typing. This video was too fast. Could nt get the concept. It would be great if u add one more video on the same.
    thanks :D

  • @shaharrefaelshoshany9442
    @shaharrefaelshoshany9442 2 роки тому

    Amazing

  • @shashankragireddy3489
    @shashankragireddy3489 5 років тому

    Nice job

  • @sivapradeep977
    @sivapradeep977 3 роки тому +1

    @29 sec ..when navin sir becomes a author 😂😂😂

  • @mahfuzhasan8657
    @mahfuzhasan8657 5 років тому +1

    Start also a series of of django

  • @charancharan2417
    @charancharan2417 5 років тому

    Hi
    Please explain concept of memory​and how it works internally in python

  • @pravinpathade3237
    @pravinpathade3237 5 років тому

    U r great

  • @shawazc3279
    @shawazc3279 5 років тому

    Super sir

  • @rajeshraut2955
    @rajeshraut2955 5 років тому

    Sir please make one more video on duck typing

  • @hatimtekrivlogs2369
    @hatimtekrivlogs2369 5 років тому +2

    sir please complete this series properly because i follow your series for learning python
    and also share to my friends

  • @Dhananjoybhatta123
    @Dhananjoybhatta123 4 роки тому

    Hello sir, I did understand your example. But I couldn't get the coding concept here. Can you make a video defining this topic in more easier way? Your contribution is appreciated.

  • @prsh1989
    @prsh1989 4 роки тому +1

    Its the hardest concept I came across in python. I watched multiple videos and this video 3-4 times, but I am not getting it. Sir, is there any other way through which you can explain it in more simple and easy to understand concept.

  • @vividhahiremani3772
    @vividhahiremani3772 3 роки тому

    Super

  • @rajendran7294
    @rajendran7294 5 років тому

    sir can u make a video on regular expression ,generators, decorators

  • @saitanush9453
    @saitanush9453 3 роки тому

    Tq

  • @yashwanthaas3233
    @yashwanthaas3233 2 роки тому +1

    Thanks aloooooot

  • @rgokul6212
    @rgokul6212 4 роки тому

    Pls make a another video on duck typing because it is little bit confusing

  • @jacobrotich5238
    @jacobrotich5238 2 роки тому

    haha did he just say "welcome back aliens?"

  • @increadibleangel7980
    @increadibleangel7980 5 років тому

    Nice

  • @Arjun147gtk
    @Arjun147gtk 4 роки тому

    What should be done in case we have to add variables? like in case of 2 objects we took self and other. What should be used in __add__ in case we are using 3 type?

  • @madhurimadas9635
    @madhurimadas9635 4 роки тому +1

    Sir, you explained inheritance, polymorphism and abstraction. But you didn't explain encapsulation, which is also an important part of OOP. If possible please make a video of it.

    • @2pokh
      @2pokh Рік тому

      Yea i agree about that

  • @saatvikpandey890
    @saatvikpandey890 4 роки тому

    Please make another video on duck typing

  • @nithyakalyani2327
    @nithyakalyani2327 5 років тому

    Sir it will be way better than pycharm

  • @AmanPatel-hy5tv
    @AmanPatel-hy5tv 4 роки тому

    Isn't it similar to Golang , when we have a interface with various method signatures and some structs implements those methods ??

  • @theshilpichaudhary
    @theshilpichaudhary 3 роки тому

    May be this helps who doesn't get the duck typing ...
    1. class HP:
    2. def laptop(self):
    3. print("From HP brand")
    4. class Dell:
    5. def laptop(self):
    6. print("From DELL brand")
    7. class Student:
    8. def Shilpi(self, brand):
    9. print("This is a student")
    10. s2.laptop()
    11. s1 = Student()
    12. s2 = HP()
    13. s3 = Dell()
    14. s1.Shilpi(s3)
    Important Points :
    A. In student class , we have provided an argument that is "brand" , and in (line : 14) , we have passed an object (belongs to dell class)
    B. We could provide the object of class HP(line : 12) or class Dell(line:13) , because both have function laptop().
    C. As we know , it doesn't matter what object from which class we are providing in (line : 14) , Then what matters ??
    D. The object which we are providing as an argument(line : 14) should have the function laptop(). [This matters only , that's it]
    This is Duck typing.
    Correct me please if i am wrong , Sharing is caring :)

  • @prateekmaurya4187
    @prateekmaurya4187 3 роки тому

    please make series on python turtle

  • @karthikburugula2572
    @karthikburugula2572 2 роки тому

    Sir,what exactly ide.execute() command does is it going to just execute the methods which we specify by class. Please clarify

    • @MagnumCarta
      @MagnumCarta 2 роки тому

      The Laptop class takes in an "IDE" object called 'ide' which has an execute method (internal object that can only be accessed by creating an "IDE" object (i.e. class Pycharm). So ide is really invoking Pycharm.execute() or MyEditor.execute().

  • @roopa6975
    @roopa6975 4 роки тому +1

    All your videos are amazing except this one. Couldn't get the concept even after watching multiple times.

    • @vighneshboga2027
      @vighneshboga2027 3 роки тому

      watch the video of "interface" in java then u shall understand duck typing easily

  • @apurvasakure1364
    @apurvasakure1364 4 роки тому

    Sir ,could you please explain duck typing with more examples . It's a little bit confusing..

  • @achyuthachinna
    @achyuthachinna 5 років тому

    hi sir i have one doubt the object name should be ide only , we can give another name and for method also execute only we should give we cant give another name.

  • @soumyaranjanpati1071
    @soumyaranjanpati1071 4 роки тому

    Plz... sir....machine learning all course upload

  • @tashaansar9383
    @tashaansar9383 4 роки тому

    yuuuhuuu tysmmm

  • @MrDallazo
    @MrDallazo 5 років тому

    Thank you for explanation. It's clear for me now

  • @wajidctc
    @wajidctc 2 роки тому

    What is the need of inheritance? We can simply pass the object as parameters and get access to other class methods.

  • @game_angela9050
    @game_angela9050 5 років тому

    Hi sir, can we expect tutorials on R language

  • @sreegopal4673
    @sreegopal4673 5 років тому

    Where do we use the duck typing

  • @vishutiwari99
    @vishutiwari99 5 років тому

    Sir this Python playlist is awesome and request you to that make some adv part also.Because core part is available every where so please make adv. Part also. Atleast one small project with adv.part.

    • @tkdevlop
      @tkdevlop 5 років тому

      What do you mean by advance?

    • @vishutiwari99
      @vishutiwari99 5 років тому

      @@tkdevlop in j2ee we make website by using server and jsp .Like that some real time project I am saying.

    • @tkdevlop
      @tkdevlop 5 років тому

      @@vishutiwari99 sorry about that sir already said that he was not gonna cover any python framework and I am pretty sure that sir not gonna write a webserver from absolutely starch. You need to learn Django/flask from somewhere else if you want to purse python regarding web-devlopment :(

    • @vishutiwari99
      @vishutiwari99 5 років тому

      @@tkdevlop ya but I just requested to sir that if he got time so he should look into this topic.

  • @narangparth
    @narangparth 4 роки тому

    Hi Navin, what's the actual use of duck typing?

  • @saichandrareddy9140
    @saichandrareddy9140 5 років тому

    sir upload quiz questions

  • @Abhishekkumarsingh-sl5yz
    @Abhishekkumarsingh-sl5yz 5 років тому

    not only execute you can use any word

  • @dhonianttak3150
    @dhonianttak3150 3 роки тому

    ❤️❤️

  • @omoruyiologbosere4591
    @omoruyiologbosere4591 4 роки тому

    Good day, I tried Inheritance while Duck Typing, but it is not working. Any reason why?

  • @ashishsinha8893
    @ashishsinha8893 5 років тому

    Sir when u upload next videos??

  • @gampaspoorthi4593
    @gampaspoorthi4593 5 років тому

    sir one more request can you tell us about any books on Python so that we can also refer and learn more examples ... want to learn Python completely plz continue da series.. it's really amazing !! thank you for responding to me in previous..

    • @bishwajit667
      @bishwajit667 5 років тому

      "head first python " or "practical programming an introduction to computer science using python"

    • @gampaspoorthi4593
      @gampaspoorthi4593 5 років тому

      bishwajit adhikary thank you