Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,183,458 members, 7,920,752 topics. Date: Wednesday, 14 August 2024 at 12:09 PM |
Nairaland Forum / Science/Technology / Programming / Dear Python Programmer, How Do You Implement Interfaces, Abstract Classes (425 Views)
As A Programmer, How Are You Coping In This Economy? / As A Programmer How Do You Learn/understand A New Language / I Want My Son To Be A Programmer, How Do I Go About It (2) (3) (4)
Dear Python Programmer, How Do You Implement Interfaces, Abstract Classes by Karleb(m): 8:36am On Nov 25, 2020 |
I noticed python doesn't come with come with easy and clear way to implement interface and abstract class and because of this, some python articles I've read played down on the importance of these in python. How do you as a python programmer implement these especially before python 3? Does popular frameworks like Django and Flask have abstract classes and interfaces? |
Re: Dear Python Programmer, How Do You Implement Interfaces, Abstract Classes by Taofeekdboy(m): 5:38pm On Nov 25, 2020 |
Karleb:In Python Class, We have Encapsulation, Polymorphization, Abstraction and Inheritance. Each of the above terms has its own function and you can implement abstraction especially in Django, cos all you need to write inside the class is abstraction = True. |
Re: Dear Python Programmer, How Do You Implement Interfaces, Abstract Classes by Petchu(m): 1:21pm On Nov 26, 2020 |
#Abstract classes: from abc import ABCMeta, abstractmethod class Petchu(metaclass = ABCMeta): @abstractmethod def petchu(pself): pass #so this would return an exception: peter = Petchu () 1 Like |
Re: Dear Python Programmer, How Do You Implement Interfaces, Abstract Classes by Petchu(m): 1:23pm On Nov 26, 2020 |
Interfaces could be implemented a number of ways probably by augmented class methods |
(1) (Reply)
Need A Developer To Reskin A Complete Script / May God Bless Any One That Anwers Me / I Need A Python Programmer
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 8 |