Skip to content
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

Treat subscripted generics as "proxies" for original class. #393

Merged
merged 3 commits into from
Feb 23, 2017

Conversation

ilevkivskyi
Copy link
Member

Fixes #392

As noted by @JukkaL, conceptually, subscripting generic classes should not create independent class objects (type should be erased at runtime). In particular, class variables should be shared between subscripted generics and original class.

Here I implement this semantics using a custom __setattr__.

@gvanrossum There is a question (assuming we agree that this is needed) whether this should go in 3.6.1 that has "feature freeze" in less than a week, or should we postpone this until 3.6.2?

ilevkivskyi and others added 2 commits February 23, 2017 00:26

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@gvanrossum
Copy link
Member

gvanrossum commented Feb 23, 2017 via email

@ilevkivskyi
Copy link
Member Author

I think we should get this in

OK, I am going to merge this soon (unless you or @JukkaL express any concerns), and will then make a PR to python/cpython repo.

@ilevkivskyi
Copy link
Member Author

OK, so here is the PR to python/cpython python/cpython#265

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.

None yet

3 participants