Top "Abc" questions

Abstract Base Classes are non-instantiable classes used to define the expected behaviour of subclasses.

Why use Abstract Base Classes in Python?

Because I am used to the old ways of duck typing in Python, I fail to understand the need for …

python abstract-class abc
python @abstractmethod decorator

I have read python docs about abstract base classes: From here: abc.abstractmethod(function) A decorator indicating abstract methods. Using …

python abc abstract-methods
Can't instantiate abstract class ... with abstract methods

I'm working on a kind of lib, and for a weird reason i have this error. Here is my code. …

python abstract-class abc six
Using abc.ABCMeta in a way it is compatible both with Python 2.7 and Python 3.5

I'd like to create a class which has abc.ABCMeta as a metaclass and is compatible both with Python 2.7 and …

python python-2.7 metaclass python-3.5 abc
Python - Testing an abstract base class

I am looking for ways / best practices on testing methods defined in an abstract base class. One thing I can …

python oop testing abc
How would I implement a dict with Abstract Base Classes in Python?

I attempted to implement a mapping in Python by using the abstract base class, MutableMapping, but I got an error …

python dictionary abc
How do I check if a numpy dtype is integral?

How do I check if a numpy dtype is integral? I tried: issubclass(np.int64, numbers.Integral) but it gives …

python numpy integer abc
Abstract classes with varying amounts of parameters

I was wondering if its possible when creating an abstract class with abstract methods if its possible to allow the …

python python-3.x abc
Python Abstract Method With It's own __init__ function

How can I define a __init__ function in both the base and derived abstract classes and have all self.* be …

python python-3.x abstract-class abc
Determine if a Python class is an Abstract Base Class or Concrete

My Python application contains many abstract classes and implementations. For example: import abc import datetime class MessageDisplay(object): __metaclass__ = abc.…

python abstract-class abc