Skip to content

Union doesn't simplify arguments in isinstance #3073

Closed

Description

@pkch
from typing import Any

o: object = 1
if isinstance(o, (int, str, int)):
    reveal_type(o)  # revealed type is 'Union[builtins.int, builtins.str, builtins.int]'

Activity

  1. gvanrossum commented on Mar 28, 2017

    @gvanrossum
    Member

    Is that still so with #3025?

  2. pkch commented on Mar 28, 2017

    @pkch
    ContributorAuthor

    Nope, it's fixed by #3025.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions