-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUG: Make dict iterators real iterators, provide "next()" in Python 2 #12299
Conversation
Why don't we just use the
|
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! |
cfdf86b
to
7643439
Compare
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 |
thanks @toobaz |
Currently,
compat.itervalues
and 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 thepandas
codebase - but if I'm missing something, it is trivial to reintroduce it) and providesnext()
in Python 2.