Skip to content

Reject isinstance() with TypedDict and NewType #3654

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
Jul 4, 2017
Merged

Conversation

JukkaL
Copy link
Collaborator

@JukkaL JukkaL commented Jul 4, 2017

These can't be used with isinstance() at runtime.

These can't be used for runtime type checking at runtime.
@JukkaL
Copy link
Collaborator Author

JukkaL commented Jul 4, 2017

The test failures are flakes (#3543).

@@ -8,6 +8,7 @@ class type:

class tuple: pass
class function: pass
class ellipsis: pass
Copy link
Member

Choose a reason for hiding this comment

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

Is this necessary? It looks like you don't use ellipses in the added tests.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The stub for mypy_extensions uses ....

@JukkaL JukkaL merged commit 5928551 into master Jul 4, 2017
@gvanrossum gvanrossum deleted the bad-instance branch July 5, 2017 16:01
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