#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 - Наука та технологія
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
# 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..
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
@@ponnapuarunpraveenkumardwp223 thanks I understood the topic very well
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😕
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 😁😁😁
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! ;)
thankuu sir for the amazing series please continue the series i am learning python from your series....
Initially I was confused with passing an object as an argument but later in the video, I got it❤️
Same here. It all made sense at the end.
you made my quarantine productive.. thank you so much
the editing is amazing 👌
Telusko Learning For Life ❤
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..
Just awesome. Really great explanation. Thanks a lot.
Thankuuu sir for making such an great effort on making video series on python...keep adding more videos on python... eagerly waiting...:)
sir keep this beautiful work :)
Now I have started enjoying python learning 😎😎😎😎😎
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
mindblowing conclusion
Great example and simple explanation 👍🙂
One of the best Explanations on Duck Typing 👍👌
Toma tu like!!!! muy buena explicación
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...
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.
The example was great but a bit confusing. Finally that was awesome. Loved it ♥.
Really awsm....fell in love with your videos and the way you teach....God bless u sir...
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 .
Great example, man!
It was a new concept for me and very nicely explained.
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...!
Hi Naveen,
Please make a video on Python Memory management,i want to know difference between JVM and Python memory management.
Telusko is great but Tbh this topic was bit confusing so PC Helper helped me understand this with ease.
you always save my day!! Thanking you!!
amazing way of explaining!!!!!!
Hello Sir After this series Plz make videos on python framework Django.......
Navin.
(The best
Best out of Best
And Many More)
The Best Teacher ever
Amazing video hahaha, i really love how you educate the audiens, it's great
First time watch your video its good and easy to understand really . Will check other videos also
thanks sir for a detailed knowledge❤
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!
Excellent explanation.
Good tutorial. Good speed too for someone who have some experience
Thanks a lot Navin!! Very well explained..
@Rossan khatri you can put it in input argument and ask a user to fetch values..which can be changed again and again....MAYBE
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
I just fall love with ur channel...
can u plz say about the language *Mathlab*
Thank you so much!
sir,would you make another video on duck typing to make the concept clear
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?
really helpful
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
AMAZING!!!
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.
I love the editing
Thank you sir 😊
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!!!
terusko > 1m subs love you sir congratulations
first time Duck typing is clear to me
i have seen all python series till now but I found it a bit confusing
@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.
thank you sir,
Thank you sir
I am glad that he only respond to the comments which were on his favour .
What about the doubts comment?
Indian academia culture
Sir plz make videos on Visual Python and GUI using Tkinter\Tcl
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
Amazing
Nice job
@29 sec ..when navin sir becomes a author 😂😂😂
Start also a series of of django
Hi
Please explain concept of memoryand how it works internally in python
U r great
Super sir
Sir please make one more video on duck typing
sir please complete this series properly because i follow your series for learning python
and also share to my friends
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.
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.
Super
sir can u make a video on regular expression ,generators, decorators
Tq
Thanks aloooooot
Pls make a another video on duck typing because it is little bit confusing
haha did he just say "welcome back aliens?"
Nice
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?
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.
Yea i agree about that
Please make another video on duck typing
Sir it will be way better than pycharm
Isn't it similar to Golang , when we have a interface with various method signatures and some structs implements those methods ??
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 :)
please make series on python turtle
Sir,what exactly ide.execute() command does is it going to just execute the methods which we specify by class. Please clarify
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().
All your videos are amazing except this one. Couldn't get the concept even after watching multiple times.
watch the video of "interface" in java then u shall understand duck typing easily
Sir ,could you please explain duck typing with more examples . It's a little bit confusing..
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.
Plz... sir....machine learning all course upload
yuuuhuuu tysmmm
Thank you for explanation. It's clear for me now
What is the need of inheritance? We can simply pass the object as parameters and get access to other class methods.
Hi sir, can we expect tutorials on R language
Where do we use the duck typing
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.
What do you mean by advance?
@@tkdevlop in j2ee we make website by using server and jsp .Like that some real time project I am saying.
@@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 :(
@@tkdevlop ya but I just requested to sir that if he got time so he should look into this topic.
Hi Navin, what's the actual use of duck typing?
sir upload quiz questions
not only execute you can use any word
❤️❤️
Good day, I tried Inheritance while Duck Typing, but it is not working. Any reason why?
Sir when u upload next videos??
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..
"head first python " or "practical programming an introduction to computer science using python"
bishwajit adhikary thank you