from abc import ABC, abstractmethod
class BaseClass(ABC):
@abstractmethod
def get_something(self):
pass
base = BaseClass()
from abc import ABC, abstractmethod
class BaseClass(ABC):
@abstractmethod
def get_something(self):
pass
class Foo(BaseClass):
def get_something(self):
pass
foo = Foo()
Used when an abstract class with abc.ABCMeta
or abc.ABC
as metaclass has
abstract methods and is instantiated.