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 joaozinho
Recipients docs@python, joaozinho
Date 2021-05-14.18:24:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1621016667.05.0.821636272564.issue44135@roundup.psfhosted.org>
In-reply-to
Content
The second parameter (classinfo) of the issubclass built-in function can be a Tuple and, starting from 3.10, it can be a Union Type as well.

The documentation states that in these cases "every entry in classinfo will be checked", but it doesn't explain if the check is AND (all) or OR (any). In contrast, the documentation of isinstance is clear: "return True if object is an instance of *any* of the types".


Here's a possible rewriting that reduces the odds of incorrect interpretations, based on the text of isinstance:
ORIGINAL: "in which case every entry in classinfo will be checked"
PROPOSAL: "in which case return True if class is a subclass of any entry in classinfo"
History
Date User Action Args
2021-05-14 18:24:27joaozinhosetrecipients: + joaozinho, docs@python
2021-05-14 18:24:27joaozinhosetmessageid: <1621016667.05.0.821636272564.issue44135@roundup.psfhosted.org>
2021-05-14 18:24:27joaozinholinkissue44135 messages
2021-05-14 18:24:26joaozinhocreate