Skip to content

Conversation

gvanrossum
Copy link
Member

Reverts #2408

This appears to have a bug; see my comment to the PR for an explanation.

@gvanrossum gvanrossum merged commit 4f7dbfc into master Nov 7, 2016
@gvanrossum gvanrossum deleted the revert-2408-namedtuple_selftype branch November 7, 2016 21:59
@elazarg elazarg mentioned this pull request Nov 11, 2016
gvanrossum pushed a commit that referenced this pull request Nov 13, 2016
(Reopening #2408 after the revert #2414. This fixes parts of #2090)
This PR does three things:

    Fix the handling of TupleType (pass original_type recursively)
    Fix the handling of TypeType (avoid ad-hoc buggy special casing)
    Make NamedTuple's _replace() and _make() return selftype, serving as test case for (1) and (2)

As a consequence of (1), some error messages are changed, as exemplified in check-isinstance.test. I think it's better now, but if it isn't, perhaps we should separate original_type and report_type as discussed in #2193.
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