Uh oh!
There was an error while loading. Please reload this page.
Revamped generic class behavior to conform to updated PEP 484 - #195
Conversation
Still need to backport to python2.
(Backport of 3819cbc, CPython issue #25665.)
ilevkivskyi
commented
Mar 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
commented
Mar 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
commented
Apr 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
commented
Apr 3, 2016
via email
Good point. IMO nothing having to do with variance is obvious, so it would
be good to spell it out. Right now I'm too tired to reason this through
with a few examples, but my intuition says that your "natural" answer is
probably correct. When I feel more rested I'll figure this out and add it
to the PEP. |
ilevkivskyi
commented
Apr 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