KEMBAR78
Reject isinstance() with TypedDict and NewType by JukkaL · Pull Request #3654 · python/mypy · GitHub
Skip to content

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).


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