Skip to content

Soften restriction for runtime generics in PEP 484 #120

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 24, 2016

Conversation

ilevkivskyi
Copy link
Member

Fixes python/typing#303

@gvanrossum Please take a look. I made a PR to allow this in mypy python/mypy#2302 . Here I just propose to soften the restriction, i.e., avoid "must".

As a motivation, in Python one always can substitute expressions, so that if IntNode = Node[int]; IntNode() works, then it is reasonable to also allow Node[int], but say that the first way is preferred.

@gvanrossum
Copy link
Member

LGTM, I'll merge this once the mypy PR is merged.

@gvanrossum gvanrossum merged commit d309d32 into python:master Oct 24, 2016
@gvanrossum
Copy link
Member

Yay!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants