Skip to content

Allow variables inside isinstance - #3070

Merged
JukkaL merged 3 commits into
python:masterfrom
pkch:fix-isinstance-tuple
Apr 3, 2017
Merged

JukkaL merged 3 commits into
python:masterfrom
pkch:fix-isinstance-tuple

Conversation

@pkch

@pkch pkch commented Mar 28, 2017

Copy link
Copy Markdown
Contributor

Fixes #3068

This would allow the use of variables inside the second argument to isinstance/issubclass, as long as those variables are assigned a tuple of types in a "visible range".

@pkch
pkch force-pushed the fix-isinstance-tuple branch from 46520b0 to 6e85c32 Compare March 28, 2017 08:24
@elazarg

elazarg commented Mar 28, 2017

Copy link
Copy Markdown
Contributor

Looks like an elegant fix.
Perhaps you can remove the TODOs in binder.py (L113 and L206) along the way, and as additional test.

@JukkaL

JukkaL commented Apr 3, 2017

Copy link
Copy Markdown
Collaborator

Thanks for the fix!

@JukkaL
JukkaL merged commit 62d4bc8 into python:master Apr 3, 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

Successfully merging this pull request may close these issues.

3 participants