Skip to content

Support multiple isinstance in a single if. #905

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

Merged
merged 1 commit into from
Oct 12, 2015
Merged

Conversation

jhance
Copy link
Collaborator

@jhance jhance commented Oct 11, 2015

This also squashes a minor weirdness where in order to infer
isinstance for resolution further in an and-expr, we were
parsing for isinstance in the entire expression!

Overall this is pretty self-explanatory. We get rid of the 'kind'
stuff and just return a tuple of optional dicts.

Fixes #900.

This also squashes a minor weirdness where in order to infer
isinstance for resolution further in an and-expr, we were
parsing for isinstance in the entire expression!

Overall this is pretty self-explanatory. We get rid of the 'kind'
stuff and just return a tuple of optional dicts.

Fixes python#900.
@jhance jhance force-pushed the if-dict branch 2 times, most recently from 15f866c to 42b6160 Compare October 11, 2015 19:57
weak,
)
if left_if_vars:
left_if_vars.update(right_if_vars)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if right_if_vars is None?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, how come this didn't get caught by mypy running on itself?

@JukkaL
Copy link
Collaborator

JukkaL commented Oct 12, 2015

Thanks for the PR! Looks good, just a single thing -- I can look at it myself.

@JukkaL JukkaL merged commit 42b6160 into python:master Oct 12, 2015
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

Successfully merging this pull request may close these issues.

2 participants