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

Allow calling Type[T] where T has generic bound #5309

merged 1 commit into from Aug 2, 2018


None yet
2 participants

elazarg commented Jul 3, 2018

Fix #3631 : looks like it was an explicit decision, made before we had self types.

The code modified in this PR was introduced here at #1569. There are no tests for the current behavior, and it seems like we actually want to allow it.

I did not add tests for classmethod/staticmethod since it's unrelated (and it works).

@ilevkivskyi ilevkivskyi self-requested a review Jul 4, 2018

@ilevkivskyi ilevkivskyi self-assigned this Jul 4, 2018


Thanks! I think just removing the error in this case makes sense. I would go even further and move the error to because it logically belongs there (but this is probably a low priority refactoring).

@ilevkivskyi ilevkivskyi merged commit 573be3e into python:master Aug 2, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
continuous-integration/travis-ci/pr The Travis CI build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment