Before abc was introduced you would see this frequently.
class Base(object):
def go(self):
raise NotImplementedError("Please Implement this method")
class Specialized(Base):
def go(self):
print "Consider me implemented"
More Related Contents:
- Is it possible to make abstract classes in Python?
- Is it possible to make abstract classes?
- What does ‘super’ do in Python? – difference between super().__init__() and explicit superclass __init__()
- How do I call a parent class’s method from a child class in Python?
- Calling parent class __init__ with multiple inheritance, what’s the right way?
- How to “perfectly” override a dict?
- How to invoke the super constructor in Python?
- How can I dynamically create derived classes from a base class
- Cast base class to derived class python (or more pythonic way of extending classes)
- Subclassing int in Python
- inheritance from str or int
- Chain-calling parent initialisers in python [duplicate]
- Inheritance of private and protected methods in Python
- Why aren’t superclass __init__ methods automatically invoked?
- Python super() raises TypeError
- TypeError: Cannot create a consistent method resolution order (MRO) [duplicate]
- Should all Python classes extend object? [duplicate]
- Which classes cannot be subclassed?
- List all base classes in a hierarchy of given class?
- Python Method overriding, does signature matter?
- How to call Base Class’s __init__ method from the child class? [duplicate]
- Python inheritance – how to disable a function
- Overriding append method after inheriting from a Python List
- Python: deleting a class attribute in a subclass
- Python super() arguments: why not super(obj)?
- Why don’t my subclass instances contain the attributes from the base class (causing an AttributeError when I try to use them)?
- Using a class’ __new__ method as a Factory: __init__ gets called twice
- Inheritance and init method in Python
- Inheritance best practice : *args, **kwargs or explicitly specifying parameters [closed]
- Python: Inheritance versus Composition