New submission from theeshallnotknowethme <nohackingofkrow...@gmail.com>:

When I tried using `isinstance` with a type (e.g. `bool`) as the 1st argument 
and a parameterized generic in a tuple (e.g. '(`bool`, `list[bool]`)') as the 
2nd argument, it raised a `TypeError`, 'isinstance() argument 2 cannot be a 
parameterized generic'. But when I did the same thing in `issubclass`, it 
returned a boolean and did not raise any `TypeError`s. Using `isinstance` with 
an object as the 1st argument and the same tuple 2nd argument also returned a 
boolean, and did not raise any `TypeError`s. Is this expected behaviour, or 
should this be fixed? This was tested in Python 3.10.0rc1 in a 64-bit system.

----------
components: Tests, Windows
messages: 399717
nosy: February291948, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: `issubclass` and `isinstance` doesn't check for all 2nd argument types
type: behavior
versions: Python 3.10

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue44932>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to