Uh oh!
There was an error while loading. Please reload this page.
Iterate on ItemsView and KeysView - #3181
Conversation
... to match the behavior of `Set` and `AbstractSet`
... to match the behavior of `Set` and `AbstractSet`
srittau
left a comment
There was a problem hiding this comment.
Sorry for the late reply and thank you for the PR. Remarks below.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
srittau
commented
Sep 3, 2019
In reference to #3184: Let's make this consistent for the annotation of |
Co-Authored-By: Sebastian Rittau <srittau@rittau.biz>
kaste
commented
Sep 5, 2019
I just applied the suggestions you made. But just wait a minute: I used |
srittau
commented
Sep 5, 2019
I think an unbound type var is basically equivalent to |
kaste
commented
Sep 5, 2019
Thanks for explaining. |
This was discussed in #3181 and the correct explanation was given that object ought to be preferred here. In practice this caused an obscure issue with mypy when using this operations on the results of six.viewkeys(), since it decided that it wanted a mapping *from* object as a result of inference contexts. Grumble.
…3294) This was discussed in #3181 and the correct explanation was given that object ought to be preferred here. In practice this caused an obscure issue with mypy when using this operations on the results of six.viewkeys(), since it decided that it wanted a mapping *from* object as a result of inference contexts. Grumble.
Sets__sub__aka-akadifferencereturn the Left not a union (this also matches the implementation ofAbstractSet__and__aka&akaintersectionalso returns Left. This is also consistent withAbstractSetandSetRelated python/mypy#7236