New submission from Nick Coghlan: Authors of __subclasshook__ methods need to decide between returning True, False and NotImplemented in various cases. Making that decision requires a clear understanding that the checks in ABCMeta.__subclasscheck__ occur in the following order:
- explicit registrations - the __subclasshook__ call - ordinary inheritance So, returning False from __subclasshook__ allows you to override normal rules of inheritance, while returning NotImplemented lets normal inheritance rules apply. Explicit registrations take precedence regardless. ---------- messages: 178724 nosy: ncoghlan priority: normal severity: normal status: open title: Better docs for ABCMeta.__subclasshook__ _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue16831> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com