[issue30463] Add __slots__ to ABC convenience class

Chris Withers report at bugs.python.org
Fri Nov 15 20:14:18 EST 2019


Chris Withers <chris at withers.org> added the comment:

I will note that this means with:

class BaseClass(ABC):
    pass


class MyDerivedClass(BaseClass):

    def __init__(self, thing):
        self.thing = thing

thing = MyDerivedClass()

thing now has both __slots__ and, evidently, a dict. That's a bit weird and confusing.

----------
nosy: +cjw296

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue30463>
_______________________________________


More information about the Python-bugs-list mailing list