I was looking into abstract base classes in python and was looking at the code in abc.py and came across this tiny class:
class ABC(metaclass=ABCMeta):
"""Helper class that provides a standard way to create an ABC using
inheritance.
"""
__slots__ = ()
Metaclasses are inherited. The idea here is that instead of declaring metaclass=ABCMeta explicitly in your class declaration, you could just subclass ABC and inherit the metaclass. The ABC class serves no purpose other than to set its own metaclass to ABCMeta.
So why does it assign an empty tuple to __slots__? What does this accomplish? Aren't the slots already empty if left uninitialized?