Guido van Rossum <gu...@python.org> added the comment:
Hm, you're effectively proposing to compute (or update) __abstractmethods__ lazily. There are a number of subtleties with that, e.g. __abstractmethods__ is currently a frozenset, and a base class's __abstractmethods__ is used when computing the __abstractmethods__ of new subclasses. Moreover, the instantiation check is in object_new(), in typeobject.c. The good news is that when you assign an empty iterable to cls.__abstractmethod__ the bit that object_new() checks is cleared, so other approaches are still open. I think adding the API currently proposed is a reasonable compromise. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue41905> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com