Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Union doesn't simplify arguments in isinstance #3073

Closed
pkch opened this issue Mar 28, 2017 · 2 comments
Closed

Union doesn't simplify arguments in isinstance #3073

pkch opened this issue Mar 28, 2017 · 2 comments

Comments

@pkch
Copy link
Contributor

pkch commented Mar 28, 2017

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]'
@gvanrossum
Copy link
Member

Is that still so with #3025?

@pkch
Copy link
Contributor Author

pkch commented Mar 28, 2017

Nope, it's fixed by #3025.

@pkch pkch closed this as completed Mar 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants