- Notifications
You must be signed in to change notification settings - Fork281
Revamped generic class behavior to conform to updated PEP 484#195
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Still need to backport to python2.
(Backport of3819cbc,CPython issue #25665.)
ilevkivskyi commentedMar 25, 2016
It looks great! Still I have found something that I think could be confusing. First, I would expect that Second (maybe related) issue is that now |
gvanrossum commentedMar 25, 2016
Ah, yes. I thought of making Ditto for repr(). The one important thing about repr() is that when you have then repr(C) shows Anyway, thanks for the encouragement. I hope others look over this important change too! I intend to land this in Python 3.5.2 (whenever it is released). |
ilevkivskyi commentedApr 2, 2016
I am now thinking about one additional thing that might be not completely clear: covariance. If I initially have classC(Iterable[Tuple[T,S]]): ... then one could be not sure whether |
gvanrossum commentedApr 3, 2016 via email
Good point. IMO nothing having to do with variance is obvious, so it wouldbe good to spell it out. Right now I'm too tired to reason this throughwith a few examples, but my intuition says that your "natural" answer isprobably correct. When I feel more rested I'll figure this out and add itto the PEP. |
ilevkivskyi commentedApr 3, 2016
I just noticed that this PR also fixes#129 . In general, I think this new "revamped" behavior is much better than the old one. |
Fixes#115