Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
BUG: Make dict iterators real iterators, provide "next()" in Python 2 #12299
Conversation
|
Why don't we just use the
|
jreback
added the
2/3 Compat
label
Feb 12, 2016
|
Makes sense, except that you could not use anymore But still the right thing to do is probably to (also) change each (then, I still fail to understand the |
|
yeh the compat was done a long time ago, its possible the actual six code was changed since then (to be better) and we have the original. ok with these kinds of changes (e.g. they do a slightly better check for |
|
the keyword argument passing is needed to generate the correct error messages. |
|
... I still don't understand: which error messages? |
|
when you pass a keyword argument, the real function gets to tell you that it doesn't need any. the other error messages still are wrong tho. but these things are not super important |
|
Got it! |
|
Above, I clearly made a mistake writing That said, I ended up
What I didn't do but may be worth doing in the medium/long run:
It is true that one driver of the decision would be to avoid problems with features ( |
|
Is anything expected from me here? |
|
write out all of the iter methods there strongly a couple instead of evaluating them at run time |
|
ping |
jreback
added this to the
0.18.0
milestone
Mar 3, 2016
jreback
closed this
in 9313089
Mar 3, 2016
|
thanks @toobaz |
toobaz commentedFeb 11, 2016
Currently,
compat.itervaluesand friends are not real iterators (under Python 3): comparewith
This PR fixes this (it drops support for
**kwargs: although it is supported bysix, I fail to see what's the utility, and it's anyway apparently not used in thepandascodebase - but if I'm missing something, it is trivial to reintroduce it) and providesnext()in Python 2.