Darren Dale <dsdal...@gmail.com> added the comment: [...] > > This wouldn't allow for the prettier error messages, but it's much cleaner > than having ABCMeta trawling through class attribute dir() lists.
I think there is another reason to do it this way. Suppose I have a custom descriptor MyProperty that stores its getter as MyProperty.my_fget. In this example: class C: @property @abstractmethod def foo(self): return 1 class D: @MyProperty def foo(self): return 2 if ABCMeta determines C.foo.fget is abstract, it will not recognize that D.foo.my_fget supplies the concrete implementation. MyProperty may provide the same interface as property, it may even subclass property, but there is no guarantee its implementation conforms to property the way ABCMeta is expecting it to. The downside to making __isabstractmethod__ a property is that if C declares foo to be a read/write property, and D redefines foo as read-only and concrete, ABCMeta will not recognize the oversight. That seems a significant deficiency to me. I'm not sure how to proceed. Darren ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue11610> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com