Raymond Hettinger <raymond.hettin...@gmail.com> added the comment:
The docs need to clarify which ABCs can satisfy isinstance() based solely on hasattr() logic and which ABCs require registration or direct subclassing. The docs should also explain why the more complex ABCs can't reliably be recognized based on the presence of desired method names. One of the original motivating reasons for the ABCs was that the presence of __getitem__ was insufficient for determining whether a class was intended to be a Mapping or a Sequence. Accordingly, those classes have to subclass from an ABC or register with the ABC in order to declare intent. ---------- assignee: -> docs@python components: +Documentation -Library (Lib) nosy: +docs@python, rhettinger _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue45024> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com