Guido van Rossum <gu...@python.org> added the comment:
I believe that the PEP 3119 example doesn't work (I've confirmed something simpler) but I have a feeling that the uses of __instancecheck__ in typing.py are actually okay. For example, isinstance(42, typing.Any) correctly calls _SpecialForm.__instancecheck__ -- because Any is not a type, it's an instance of typing._SpecialForm so it all works out correctly. (I haven't checked out the other -- @Serhiy do you have time to look into that one?) ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue45791> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com