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 serhiy.storchaka
Recipients gvanrossum, serhiy.storchaka
Date 2021-07-12.05:33:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1626068010.0.0.827203286312.issue44606@roundup.psfhosted.org>
In-reply-to
Content
1. Different handling of None:

>>> isinstance(None, int | type(None))
True
>>> issubclass(type(None), int | type(None))
True
>>> isinstance(None, int | None)
True
>>> issubclass(type(None), int | None)
False

2. Different handling of virtual subclasses:

>>> import collections.abc
>>> isinstance({}, int | collections.abc.Mapping)
True
>>> issubclass(dict, int | collections.abc.Mapping)
False

I do not know what behavior is correct.
History
Date User Action Args
2021-07-12 05:33:30serhiy.storchakasetrecipients: + serhiy.storchaka, gvanrossum
2021-07-12 05:33:30serhiy.storchakasetmessageid: <1626068010.0.0.827203286312.issue44606@roundup.psfhosted.org>
2021-07-12 05:33:29serhiy.storchakalinkissue44606 messages
2021-07-12 05:33:29serhiy.storchakacreate