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 rhettinger
Recipients JelleZijlstra, anuppari, docs@python, gvanrossum, kj, rhettinger
Date 2021-09-02.20:36:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1630615001.25.0.561092657074.issue45024@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2021-09-02 20:36:41rhettingersetrecipients: + rhettinger, gvanrossum, docs@python, JelleZijlstra, kj, anuppari
2021-09-02 20:36:41rhettingersetmessageid: <1630615001.25.0.561092657074.issue45024@roundup.psfhosted.org>
2021-09-02 20:36:41rhettingerlinkissue45024 messages
2021-09-02 20:36:41rhettingercreate