Skip to content

Disallow isinstance of generic expressions #2373

Closed
@ddfisher

Description

@ddfisher

Now that runtime generics are allowed (thanks to #2302), we should prevent people from making calls like:

isinstance(["foo"], List[int])

because it won't behave as expected. I.e. in this case, it will return True. (First instance of user confusion appeared in #2369.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions