Skip to content

Fix misindented del statement #3954

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
Sep 14, 2017
Merged

Conversation

gvanrossum
Copy link
Member

Fixes #3892.

Everywhere we infer the correct type for a partially-typed variable,
we do two things: set var.type and delete var from partial_tyes.
However in one place (try_infer_partial_type_from_indexed_assignment())
the var.type assignment was skipped if the current node was deferred
but the deletion was done unconditionally. This caused the partial
type to remain in a place where serialization could not handle it.

Fixes python#3892.

Everywhere we infer the correct type for a partially-typed variable,
we do two things: set var.type and delete var from partial_tyes.
However in one place (try_infer_partial_type_from_indexed_assignment())
the var.type assignment was skipped if the current node was deferred
but the deletion was done unconditionally.  This caused the partial
type to remain in a place where serialization could not handle it.
@gvanrossum gvanrossum merged commit 3db1451 into python:master Sep 14, 2017
@gvanrossum gvanrossum deleted the fix-3892 branch September 14, 2017 02:49
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.

1 participant