This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author uriyyo
Recipients gvanrossum, rhettinger, uriyyo
Date 2021-02-17.18:35:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1613586904.85.0.210376566237.issue43243@roundup.psfhosted.org>
In-reply-to
Content
When I work with ABC classes usually I faced a problem -  I forget to implement one of the methods or make a typo in the method name. In such case I will know about it only when I will try to instantiate a class.

In case when a hierarchy is big you should go through classes and find the exact class where the problem is.

With this feature, in a case when a class inherits from strict ABC and doesn't implement all abstract methods of strict classes it will fail at class declaration rather than at instance creation as with regular ABC classes.

As an option, I can run mypy every time before start the python interpreter.

The perfect behavior for me is a case when ABC class will be strict by default, but it will break the existing code.

Examples to explain the idea:
```
from abc import ABC, abstractmethod

class Base(ABC):
    @abstraabstractmethod
    def foo(self):
         pass

class A(Base, ABC):  # totally okay, because class directly inherits from ABC
     pass

class B(Base):  # will fail, because class doesn't implement foo method
    pass
```

Raymond, could you please explain why the current behavior is default.
History
Date User Action Args
2021-02-17 18:35:04uriyyosetrecipients: + uriyyo, gvanrossum, rhettinger
2021-02-17 18:35:04uriyyosetmessageid: <1613586904.85.0.210376566237.issue43243@roundup.psfhosted.org>
2021-02-17 18:35:04uriyyolinkissue43243 messages
2021-02-17 18:35:04uriyyocreate