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.
|
In reference to #3184: Let's make this consistent for the annotation of |
Co-Authored-By: Sebastian Rittau <srittau@rittau.biz>
|
I just applied the suggestions you made. But just wait a minute: I used |
|
I think an unbound type var is basically equivalent to |
|
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