X Tutup
Skip to content

"parameterized generic" should be "argumentized generic type" #145699

@hyperkai

Description

@hyperkai

Bug report

Bug description:

Setting a generic type with a type specification [] to isinstance() and issubclass() gets the wrong error messages as shown below:

*Notes:

  • Python 3.15.0a6
x = 100

isinstance(x, tuple)           # No error
isinstance(x, tuple[int, str]) # Error

TypeError: isinstance() argument 2 cannot be a parameterized generic

class Cls: ...

issubclass(Cls, tuple)           # No error
issubclass(Cls, tuple[int, str]) # Error

TypeError: issubclass() argument 2 cannot be a parameterized generic

Actually, saying "parameterized" reminds function parameters so "argumentized" should be used and "type" should also be used after "generic" as shown below:

*Notes:

  • "argumentized" isn't common but intuitive.

TypeError: isinstance() argument 2 cannot be an argumentized generic type

TypeError: issubclass() argument 2 cannot be an argumentized generic type

parameterized
argumentized

CPython versions tested on:

3.15

Operating systems tested on:

Windows

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      X Tutup