Skip to content

Make argument types in function type inference explicitly Optional #1392

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
Apr 18, 2016

Conversation

rwbarton
Copy link
Contributor

The old version happened to work because an argument would only be
omitted when the corresponding formal argument has a Callable type,
and in that case constraint generation does isinstance checks on the
actual argument type. But calling infer_constraints with actual=None
is not really good.

(I noticed this while experimenting with moving some Union argument
types to the second pass of function type inference.)

The old version happened to work because an argument would only be
omitted when the corresponding formal argument has a Callable type,
and in that case constraint generation does isinstance checks on the
actual argument type. But calling infer_constraints with actual=None
is not really good.

(I noticed this while experimenting with moving some Union argument
types to the second pass of function type inference.)
@gvanrossum gvanrossum merged commit b602ecc into python:master Apr 18, 2016
@rwbarton rwbarton deleted the rwbarton-infer-args branch April 19, 2016 15:18
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