Тёмный

Abstract Class and Abstract Method in Python 

Telusko
Подписаться 2,4 млн
Просмотров 350 тыс.
50% 1

Method which is decorated with @abstractmethod and does not have any definition.
Python Don't support Abstract class, So we have ABC(abstract Base Classes) Module, so we can use here to achieve abstract classes. And will see what is abstract class and why we need it. An abstract class can be considered as a pattern for other classes. A class which contains one or more abstract methods is called an abstract class. An abstract method is a method that has a declaration but does not have an implementation.
Support by
becoming a Member : / @telusko
Instamojo (India) : www.instamojo.com/@NavinReddy/
Paypal : www.paypal.me/navinreddy20
UPI : navinreddy20@okicici
BlockChain Full Course : courses.telusko.com/learn/Hyp...
Spring Full Course : courses.telusko.com/learn/Spr...
Spring Full Course (UDEMY) : www.udemy.com/course/spring-5...
Python Full Course (UDEMY) : shorturl.at/EPXZ9
Angular Full Course : courses.telusko.com/learn/Ang...
Rest API in Spring Boot : goo.gl/5Wgsk6
Restful Web Services Tutorial : goo.gl/3mosnz
Spring Boot Tutorials : goo.gl/7894NE
Editing Monitors :
amzn.to/2RfKWgL
amzn.to/2Q665JW
amzn.to/2OUP21a.
Editing Laptop :
ASUS ROG Strix - (new version) amzn.to/2RhumwO
Asus vivoBook :amzn.to/2wS0Hpt
Camera : amzn.to/2OR56AV
lens : amzn.to/2JihtQo
Mics
amzn.to/2RlIe9F
amzn.to/2yDkx5F
amzn.to/2WYqLde
Check out our website: courses.telusko.com
Follow Telusko on Twitter: / navinreddy20
Follow on Facebook:
Telusko : / teluskolearnings
Navin Reddy : / navintelusko
Follow Navin Reddy on Instagram: / navinreddy20
Follow Telusko Official Page : / telusko_edutech
Subscribe to our other channel:
Navin Reddy : / @navinreddy
Telusko Hindi :
/ @teluskohindi
Subscribe to the channel and learn Programming in easy way.
BlockChain Tutorial : bit.ly/2IyH8EJ
Hyperledger Fabric : shorturl.at/ekmCJ
Golang Tutorial : shorturl.at/ksvMP
Servlet JSP tutorial playlist : goo.gl/y1kvwc
Java Tutorial : goo.gl/p10QfB
Kotlin Tutorial : goo.gl/JedEzX
Scala Tutorials for Java Developers : goo.gl/8H1aE5
C Tutorial Playlist : goo.gl/8v92pu
Android Tutorial : goo.gl/MzlIUJ
XML Tutorial : goo.gl/Eo79do
Design Patterns in Java : goo.gl/Kd2MWE
Socket Programming in Java : goo.gl/jlMEbg
Spring MVC Tutorial : goo.gl/9ubbG2
OpenShift Tutorial for Beginners : goo.gl/s58BQH
Spring Framework with Maven : goo.gl/MaEluO
Sql Tutorial for Beginners : goo.gl/x3PrTg
String Handling in Java : goo.gl/zUdPwa
Array in Java : goo.gl/uXTaUy
Java Servlet : goo.gl/R5nHp8
Exception Handling in Java : goo.gl/N4NbAW

Наука

Опубликовано:

 

20 фев 2020

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 291   
@thisisdenish
@thisisdenish 3 года назад
Summary: abstract method is a method which only has declaration and doesn't have definition. a class is called abstract class only if it has at least one abstract method. when you inherit a abstract class as a parent to the child class, the child class should define all the abstract method present in parent class. if it is not done then child class also becomes abstract class automatically. at last, python by default doesn't support abstract class and abstract method, so there is a package called ABC(abstract base classes) by which we can make a class or method abstract.
@Xaveth
@Xaveth 3 года назад
Dude... thank you! Very clear.
@user-bh7rg7eu1k
@user-bh7rg7eu1k 3 года назад
Love you, Dude
@likhithap6109
@likhithap6109 3 года назад
thank you
@rahulgaonkar3431
@rahulgaonkar3431 3 года назад
thanx bro
@will44559
@will44559 3 года назад
10 minutes video is awesome, 1 minute read paragraph is bravo!
@sujithkumar_ga
@sujithkumar_ga 3 года назад
for those who did not understand! assume a situation or an example (u r given a task to design some apps and an app to qualify it must and should contain some specific features like( brightness, notification ).so basically you can declare an abstract class with these feature declarations( brightness, notification ), but not the body in the abstract class and later u inherit them keeping in mind that while you are designing you must and should declare these feature's body for sure along with some more features and u might use the same abstract class for other app design because even it must also contain the specific features along with other, but the body declarations might change from class to class or an app to app if you are doing any real-time work). hope u understood this
@qazafisheikh530
@qazafisheikh530 4 года назад
it was soooo confusing
@VishuencApp
@VishuencApp 4 года назад
Yes, not explained with good examples and details.
@_.sunnyraj._
@_.sunnyraj._ 4 года назад
No
@sujithkumar_ga
@sujithkumar_ga 3 года назад
for those who did not understand! assume a situation or an example (u r given a task to design some apps and an app to qualify it must and should contain some specific features say brightness, notification .so basically you can declare an abstract class with these feature declarations but not the body and later u inherit them in keeping in mind that while design you must and should declare these feature's body for sure along with some more features and u might use the same abstract class for other app design because even it must also contain the specific features along with other but the body declarations might change from class to class or an app to app if you are doing any real-time work). hope u understood this
@vernanonix
@vernanonix 3 года назад
@@sujithkumar_ga So I'm still trying to wrap my head around this. From what I'm seeing, using this video as the example, we declare process in the Computer class as an abstract method and therefore we get an error and to fix that error, we override it in a subclass, say Laptop, by redefining process. So then why even bother with the abstract method at all? Making the abstract method just seems like a waste of time if it's not going to do anything and I have to add the actual definition somewhere else.
@sujithkumar_ga
@sujithkumar_ga 3 года назад
@@vernanonix u will get to know better when u do real time projects 👍
@ansafnisam2443
@ansafnisam2443 3 года назад
I see many are still confused with the concept and also with "how is it different from duck typing". Here is an example to get it cleared. This is an exam 'hall' and there are students from 2 diffrent 'classes' seated. Class A has a maths test, Class B has social. The invigilator says that to enter the hall, every one must carry an instrument box. Now students of classes both A and B must bring one even if B class don't have its use. So the class A will have a set of compass, rulers, pencils etc in it. But since students of class B don't have any use, they will just bring one with a pencil or even just empty (pass) because its compulsory to bring one in to be in the hall. If a parent class has an abstract method, every child must also have one. So each child will have to define one of thier own. In duck typing, It isn't necessary to define the parent class method for each child classes. it just simply have to point to the class where the particular method lies. Here we would have to define for each. I hope this helps
@Vishal360
@Vishal360 Год назад
Daymnnn 🤝🏻
@sameernayak9611
@sameernayak9611 4 года назад
This video is quite confusing sir, can you please make one more so that we can understand this concept better.
@hyperskivo8426
@hyperskivo8426 4 года назад
Actually the video is very concise and clear
@_.sunnyraj._
@_.sunnyraj._ 4 года назад
@@hyperskivo8426 yes
@alwayslakshmipathi2532
@alwayslakshmipathi2532 3 года назад
yeah... I felt irritated
@ArjunKrishna-lx1re
@ArjunKrishna-lx1re 3 года назад
@@hyperskivo8426 then tell me, why we need abstract class
@anindian4601
@anindian4601 3 года назад
@@ArjunKrishna-lx1re 🤣 Good question bro, I Think Navin has missing some logics and codes better we have to refer other utubers too , dont rely on him.
@prakhar1303
@prakhar1303 3 года назад
Essentially, you define abstract methods in an abstract class to ensure that it's child classes have a compulsion of having those methods defined inside them
@pranavnyavanandi9710
@pranavnyavanandi9710 2 года назад
Otherwise, the abstract method that is inherited by the child will make it an Abstract Base class thus preventing instantiation. So if we are to instantiate the child class, implementing the abstract methods becomes necessary.
@kunalpandey2066
@kunalpandey2066 2 года назад
we can find its usecase in design patterns
@pranavnyavanandi9710
@pranavnyavanandi9710 2 года назад
@@kunalpandey2066 Hi. Can you elaborate? Design patterns for designing what?
@l3tt3rsnumbers0nly
@l3tt3rsnumbers0nly Год назад
this explanation makes me understand its use i guess.
@AvyStarr
@AvyStarr 3 месяца назад
It's best to use, when we use polymorphism.
@tharunguduru7934
@tharunguduru7934 4 года назад
no teacher teaches me that whiteboard example to explain the concept of abstraction,, your a genius sir..
@dipenpandit684
@dipenpandit684 7 месяцев назад
You just implemented the exact thing that my teacher taugh me in my Object Oriented Design lecture... Thank you so much for the video.....❤
@md.anisurrahman1856
@md.anisurrahman1856 2 года назад
Probably need more explanation about this topic. Why we need to create abstract classes. But among all of the youtube videos, this is much much better than others. Thank you...
@KeremAli-cm3pj
@KeremAli-cm3pj День назад
buddy, this is the best option we have... and thats not a compliment.
@aman31dec
@aman31dec 3 года назад
Can you please explain more on why do we need abstract classes? It's not very clear to me. This will be really helpful. Thanks!
@JoaoVitorBRgomes
@JoaoVitorBRgomes 2 года назад
It's a Object Oriented Programming thing. Maybe you are designing many classes and these classes share a common method (in teacher's example is processing(), so each time you inherit in a new class e.g. Laptop, it is mandatory/compulsory that you define processing() method there. I think it is a way to keep organized your OOP project.
@mevlutkaymaz3097
@mevlutkaymaz3097 2 года назад
When you have can possible have multiple(different) output/input, then you will need to create a base class(or abstract class) to use for multiple objects.
@Rafian1924
@Rafian1924 2 года назад
Simply, to follow a specific strict structure for the development of functionality.
@yes_i_am8378
@yes_i_am8378 4 года назад
where is your energy man in this tutorial? Btw, U r awesome...
@revolutionaryaihub-aonesto5228
@revolutionaryaihub-aonesto5228 4 года назад
Thanks a lot sir...please complete data structures and algorithms with python...and if possible start machine learning/data science..as u were telling earlier u we're about to start ...
@meghanadalal9837
@meghanadalal9837 4 года назад
yess yess yessss exactly
@Spinsters_batch
@Spinsters_batch 4 года назад
Yes sir
@sandeepreddy1197
@sandeepreddy1197 2 года назад
@@meghanadalal9837 haa yes
@SP-un3rj
@SP-un3rj 2 года назад
Yes sir please make it
@AmirKhan-zy9qc
@AmirKhan-zy9qc 3 года назад
Actually, the function of the abstract class is the programmer shouldn't be able to use a class and its method but he has to provide those methods and its definition to other inheriting classes. By using such a feature the programmer is forcing himself to provide different definitions in inheriting classes. Here what Navin is trying to say is all electronics like laptops desktops and mobiles are computers so the programmers must define all the parts like display and processor to all electronics like laptops desktops and mobiles because without such part they won't work
@samgaines2886
@samgaines2886 2 года назад
Thanks for this. Understood the concept but didn’t really get the “why.” This helps
@malaygangulycodinghighway8547
@malaygangulycodinghighway8547 4 года назад
wonderful sir, great tutorial, thank you
@theprimordialdude1138
@theprimordialdude1138 4 года назад
Many many thanks for posting the missed leathers of python. We are waiting for it👌👌👌👌😋😋
@superallipalli
@superallipalli 3 года назад
Loved this video! Good explanation , good job.
@alonsom.donayre1992
@alonsom.donayre1992 4 года назад
Sorry i cant understand very well what u said about when is useful to use an abstract classs only with abstract methods? can you answer me that please
@NoorAli-uu9wk
@NoorAli-uu9wk Год назад
Absolutely Brilliant Video! Thanks
@meershahidmanzoor
@meershahidmanzoor 2 года назад
Respected and honourable sir ,i have been learning python from scratch only on your RU-vid channel. I wanna thank you from bottom of my heart.Till now i didn't face any problem or confusion.but now i was Little bit confused about the abstract class, why do we use and why do we need them. ***I have come up with a conclusion that : we use abstract classes and abstract method to override the abstract method again and again in other subclasses of abstract class.*** If it is correct? kindly reply.Big fan sir❤️...God bless you
@sikandarsingh5594
@sikandarsingh5594 4 года назад
Sir , make a video on metaclass, why it is used and implementation details..
@MasterCoder99
@MasterCoder99 Год назад
Sir, could you do future videos on how to pass python certificiations, specifically the PCPP (Python institute professional certfied). By the way, brilliant instruction. Thanks
@utkarshpuri3739
@utkarshpuri3739 3 года назад
"If you can't explain a topic, you never understood it well" ~~ Someone
@jayasuryaviswanath2149
@jayasuryaviswanath2149 3 года назад
Einstein
@PritishMishra
@PritishMishra 4 года назад
Please make videos on Python Projects
@mohanadmohamed5501
@mohanadmohamed5501 3 года назад
10:38 Whiteboard class extend Laptop class because it has the implication "definition" of the abstract method "process" otherwise we must implement "define" it inside the Laptop class. am I correct?
@umeshpatil6271
@umeshpatil6271 4 года назад
Thanks for making easy, understanding videos on python. But this one was a bit confusing for non IT people like me!!! Anyways thanks :-)
@srinivasmarla3947
@srinivasmarla3947 4 года назад
Hi Navin Reddy. I saw all your videos on python for beginners. And all the vids are very useful. I have a situation where i have different data in two files.only one column is common in bith the files. By using the above two files i have to create a new file. How can i do it in python
@gajendrasonare
@gajendrasonare 2 года назад
By the defination, abstraction is used to hide complexity of program but this defination doesn't seems appropriate in python implementation of abstraction.
@Rajadahana
@Rajadahana 2 года назад
I am pretty much sure I have missed something, but I am not sure what it is.At 5:11 - I got the concept that if you inherit an Abstract class, the child class will also be Abstract. That I understood, tried and was successful. But didn't properly get the concept after that. If the parent class is an Abstract Class, and if the child class has its own methods, the methods of the child class run without a problem. Have I got it right?
@tkishore1260
@tkishore1260 2 года назад
Sir this video is little confusing . I used computer inside whiteboard class then I should get the output right ? But I'm getting error that can't instantiate abstract calss whiteboard with abstract mathods process
@athirap8862
@athirap8862 3 года назад
Can you make a video on infrastructure automation using powershell and python
@codedjango
@codedjango 4 года назад
Thank you sir....please do a video on dataclasses in python3.5 and onwards...
@priyankachendekar7720
@priyankachendekar7720 3 года назад
what is difference between interface and abstract class,getting confused on this abstract class and method concept
@saddamahmad2310
@saddamahmad2310 4 года назад
thank you very much sir for this video
@ArhamKhan05
@ArhamKhan05 Месяц назад
Thank You So Much Sir.
@vinaykumarpandiri4686
@vinaykumarpandiri4686 4 года назад
Please make lectures on Data Analytics and ML
@rohitjoemendus8503
@rohitjoemendus8503 4 года назад
Why does this code show an error from abc import ABC, abstractmethod class Computer(ABC): @abstractmethod def process(self): pass class Laptop(Computer): def process(self): print("Running") class Whiteboard(Computer): def write(self): print("Writing") class Program: def work(self, com): print("Working") com.process() c1 = Laptop() c2 = Whiteboard() p1 = Program() p1.work(c1) p1.work(c2) You didn't show the output after you changed whiteboard as a child class.
@palakgupta50
@palakgupta50 4 года назад
Is it necessary to implement all the abstract methods in a single sub class??
@udaypkumar
@udaypkumar 3 года назад
nice
@anuragr5850
@anuragr5850 2 года назад
super cool!😺
@abhilashk2534
@abhilashk2534 3 года назад
Please add video for encapsulation concept(__x) to restrict input. Thanks!
@piyasidey2117
@piyasidey2117 4 года назад
Sir please make another video about abstraction class and method..it's too confusing.
@samadhanmhaske5900
@samadhanmhaske5900 4 года назад
Your grate sir thank so much
@rajeshseemakurthi1595
@rajeshseemakurthi1595 Месяц назад
excellent sir
@mohitkumargautam4060
@mohitkumargautam4060 4 года назад
sir...please makes video on data structures and algorithms with python please please
@antimghosh7208
@antimghosh7208 4 года назад
plzz make a series on REST API details on python with a hands-on project
@zeeshanrafique8175
@zeeshanrafique8175 4 года назад
Hi @Telisko , Which video editing tool you use ?
@anishnepal3486
@anishnepal3486 4 года назад
camtasia studio
@python_knooobb
@python_knooobb 10 месяцев назад
can you please help with practice problems to go through th concept abstract class
@azanhaider
@azanhaider 4 года назад
I am coding a sign language translation project. i am getting error "Process finished with exit code 134 (interrupted by signal 6: SIGABRT)". can you please help with this reply asap
@noobygeeko
@noobygeeko 4 года назад
Thanks sir for working for us
@joshibrothers5499
@joshibrothers5499 2 года назад
Nice
@its_kumar
@its_kumar 4 года назад
Please make a video on multiple inheritance in python.... ☺️
@pawnage3
@pawnage3 2 года назад
Thank you very much!
@sreelakshmirajesh1855
@sreelakshmirajesh1855 7 месяцев назад
I have a doubt that, what is the significance of abstract method because method overloading and inheritance seems to be same as abstract classes... couldn't find the difference in between them...can you please help in this?
@exevil2056
@exevil2056 2 года назад
Is this done to achieve abstraction from oops concept , please I need answer
@mehedeehassan208
@mehedeehassan208 2 года назад
What can we do about interface like java ? Say, we need to implement strategic design patter like java we cannot use interface ,what should we do then ?
@Techwithgk369
@Techwithgk369 4 года назад
nice explanation in udemy
@gaurrahul619
@gaurrahul619 4 года назад
How to create Final method in Python as I import typing module but it didn't work
@binuscorpia
@binuscorpia 4 года назад
can you explain the concept with real life examples?
@momenulislam8567
@momenulislam8567 2 года назад
The concept is actually tough to understand here if we don't have basic understanding of Java abstract class.. But very nicely explained. ❤🎉
@temporarychannel4339
@temporarychannel4339 Год назад
This vid isn't clear at all. I only understood b/c I know abstract classes from C++, only then did I understand overriding abstract methods in child classes. Otherwise, the explanation is very unclear but he did show how to create and override abstract classes/methods at least using the custom library.
@Sharukkhan-kx9rw
@Sharukkhan-kx9rw 3 года назад
Could you try different examples like Pizza, Burger instead of the Computer, please?
@bsmaheshkumar5328
@bsmaheshkumar5328 3 года назад
1. Abstract base class desire its subclass or child class to instantiate the class object by inheriting its base class. 2. ABC methods require to its proceeding methods in a subclass to add the functionality. 3. ABC just def the methods but all its functionality will be designed by a subclass. 4. ABC customize the behaviour of isinstance() and issubclass()
@pranavnyavanandi9710
@pranavnyavanandi9710 2 года назад
Did you know ABC is what is called a "metaclass"?
@gopalakrishnadoddi4869
@gopalakrishnadoddi4869 3 года назад
Sir your specticulars are nice today
@Ragul60
@Ragul60 3 года назад
Sir it's confusing 😐😐 please make another video for abstract classes and methods 🙏🙏 @Telusko
@cosmicchild7182
@cosmicchild7182 2 года назад
Good Explanation !
@jawadaslam8537
@jawadaslam8537 3 года назад
can a non abstract class have abstract methods in python ..in java,c++ its not but what about python
@muddasarajmal2454
@muddasarajmal2454 2 года назад
Great explaination, but can you please differentiate between inheritance and abstraction. Anyone can answer to it to spread knowledge. Thanks.
@charlesalmadi9665
@charlesalmadi9665 3 года назад
4:50 I expect it to work, because we are creating an object of a concrete rather than abstract class
@lyricsmint567
@lyricsmint567 4 года назад
Can we expect a video, explaining Django 3.0 new features..? and advance stuff like cookies and sessions in Django.?
@amanagrawal003
@amanagrawal003 4 года назад
yes i have exact same question
@aishwaryalaxmiveeramalla739
@aishwaryalaxmiveeramalla739 4 года назад
It had taken me 1 hr to properly understand this one....but finally i felt the example was cool. Thank you Sir.
@8860777750
@8860777750 3 месяца назад
Thanks for making such helpful video for learners. But I either was not able to understand the ABC concept of class & method by watching this video or video missed the good example of this. Thanks to chatGPT it gave me below real world example which explains the concept really well. e.g. a vehicle might have common attributes like speed, fuel, and methods like start(), stop(), and accelerate(). However, different types of vehicles (e.g., car, motorcycle, truck) might have different implementations for these methods. 1. Vehicle is an abstract base class defining a common interface for all vehicles, with abstract methods like start(), stop(), and accelerate(). 2. Car, Motorcycle, and Truck are concrete subclasses of Vehicle, each providing its own implementation for the abstract methods. 3. Each subclass can have its own specific attributes and methods, but they all must implement the methods defined in the Vehicle base class. below is the code..... from abc import ABC, abstractmethod class Vehicle(ABC): def __init__(self, speed=0, fuel=100): self.speed = speed self.fuel = fuel @abstractmethod def start(self): pass @abstractmethod def stop(self): pass @abstractmethod def accelerate(self): pass class Car(Vehicle): def start(self): print("Car started") def stop(self): print("Car stopped") def accelerate(self): print("Car accelerating") class Motorcycle(Vehicle): def start(self): print("Motorcycle started") def stop(self): print("Motorcycle stopped") def accelerate(self): print("Motorcycle accelerating") class Truck(Vehicle): def start(self): print("Truck started") def stop(self): print("Truck stopped") def accelerate(self): print("Truck accelerating") car = Car() car.start() car.accelerate() car.stop() motorcycle = Motorcycle() motorcycle.start() motorcycle.accelerate() motorcycle.stop() truck = Truck() truck.start() truck.accelerate() truck.stop()
@gauravtalwar358
@gauravtalwar358 3 года назад
Need more clarity on Abstract Class and Methods
@user-fn5yt8st8u
@user-fn5yt8st8u 4 года назад
nothing understood during the last part of video please make a video on this again
@indreeshpandey343
@indreeshpandey343 3 года назад
sir please bring up a series of python for intermediate
@boburbekbotirov8282
@boburbekbotirov8282 2 года назад
can do this namely take instance from child class by abstrac class
@_.sunnyraj._
@_.sunnyraj._ 4 года назад
I heard goosebumps in whole video Was it only me
@abubakarkhawaja4762
@abubakarkhawaja4762 4 года назад
Sir Assalam o alikum, i am watching your videos on blockchain and i am really very impressed how you explain everything in detail i have a question In hyperledger fabric there are 2 ways to reach consensus endosers and orders. What i am asking is who are endosers if they are admins Doesnt it make hyperledger centralized? Can i be an endoser?
@seferideveloper6933
@seferideveloper6933 Год назад
Ve aleykumselam
@rachamallasairamreddy45
@rachamallasairamreddy45 3 года назад
how can we define a variable in abstract
@hmak5423
@hmak5423 4 года назад
Did he just call me an alien?
@tanaysamanta4730
@tanaysamanta4730 2 года назад
Thank you
@Sreeja2202
@Sreeja2202 3 года назад
Sir..can u explain acm ICPC 2015 world finals problem c catering in python..??
@nehaaadarsh
@nehaaadarsh 4 года назад
Excellent!!! Thank you sir❤️
@ankireddy5483
@ankireddy5483 4 года назад
Upload a videos on boto3 please
@asadrasheed5625
@asadrasheed5625 4 года назад
Hi Naven, Thanks for this wonderful tutorial. I am unable to import ABC module. Could you please tell me that what's the reason behind it?
@Hemantsharma-nq7ui
@Hemantsharma-nq7ui 3 года назад
Write abc as 'abc' not 'ABC'
@Hemantsharma-nq7ui
@Hemantsharma-nq7ui 3 года назад
Python doesn't accept it
@gvbg5923
@gvbg5923 3 года назад
The same program i have executed but still the same error TypeError: Can't instantiate abstract class ChildABST with abstract methods AbsMet here in the video naveen executed successfully but it's not when i tried with the same, what's wrong it has i dont understand
@DGDG0000000
@DGDG0000000 4 года назад
OK, but much more, can you limit the argument type to pass to be Computer type child only? Because THIS should be something more about abstraction contract to be.
@maazshaikh9715
@maazshaikh9715 2 года назад
Very informative video. I have one doubt. I don't agree with this statement - "An abstract method is a method that has a declaration but does not have a definition." We can define the abstract method and use it later with super function. Right?
@haricharan2836
@haricharan2836 Год назад
You can
@VictorKDurand
@VictorKDurand Год назад
Ok so if you need to create multiple class objects which all have something in common and which you need to imperatively implement because you will later need to call (such as obj.process() in this video), then you use an ABC class and enforce the child classes to all have the set of methods you want. That's what I understand.
@trishalanyaik8910
@trishalanyaik8910 4 года назад
@Navin- Had someone been making a fake LinkedIn account by your name or is it you connecting and blocking people? I received a similar request and not sure if it was from authentic account.
@prashantkumargautam4191
@prashantkumargautam4191 3 года назад
Yes it will work, if in inherits
@anamikaupadhyay5317
@anamikaupadhyay5317 4 года назад
Yah....it's was really confusing sir ....how can i get it ?
@abhijitvarpe9175
@abhijitvarpe9175 4 года назад
Sir, please make video on data structure and algorithm in python
@sreekanththota2200
@sreekanththota2200 4 года назад
yes sir...
@ritikaagarwal7
@ritikaagarwal7 3 года назад
At 9:51 my output comes only 'solving bugs'..that com.process is not executing..i dont understand what is happening and there is no error showing
@NeotenicApe
@NeotenicApe 2 года назад
The println macro at 7:35, you had been writing Rust haha
@dineshcuts
@dineshcuts 3 года назад
Bro need a video abt encapsulation
@mohammedumarfarhan9900
@mohammedumarfarhan9900 4 года назад
I don't think so it's gonna work
@gururajchadaga
@gururajchadaga 4 года назад
This video made me realize the significance of duck typing.
@_JIT
@_JIT 3 года назад
Yea ikr. I didnt get what is abs is tbh with this video. it feels like extension of Duck typing video
@ritiksinghania5618
@ritiksinghania5618 3 года назад
sir we cant import abs it is giving error plzz help it out
@dhananjayyeole7076
@dhananjayyeole7076 Год назад
why com.process() is used in class Programmer??
@deepaksharma-xr1ih
@deepaksharma-xr1ih 3 года назад
perfect
@umarshaikh1952
@umarshaikh1952 3 года назад
We can not create the object of laptop class because inside the laptop class is abstract method if we create the object of abstract so we will get the error
Далее
#61 Python Tutorial for Beginners | Iterator
10:48
Просмотров 337 тыс.
#63 Python Tutorial for Beginners | Exception Handling
15:59
It was like a real simulation👩🏻‍💻
00:15
Просмотров 4,1 млн
Protocol Or ABC In Python - When to Use Which One?
23:45
Socket Programming Using Python
17:07
Просмотров 289 тыс.
Python abstract classes 👻
7:45
Просмотров 73 тыс.
5 Good Python Habits
17:35
Просмотров 407 тыс.
Улучшил свои Apple Watch!
0:25
Просмотров 45 тыс.