Message397281
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. |
|
Date |
User |
Action |
Args |
2021-07-12 05:33:30 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, gvanrossum |
2021-07-12 05:33:30 | serhiy.storchaka | set | messageid: <1626068010.0.0.827203286312.issue44606@roundup.psfhosted.org> |
2021-07-12 05:33:29 | serhiy.storchaka | link | issue44606 messages |
2021-07-12 05:33:29 | serhiy.storchaka | create | |
|