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
Modification to "pairwise" in itertools recipes #49600
Comments
I feel that the "pairwise" recipe could be slightly more elegant if "for |
Assigning to Raymond. Note that "for elem in b: break" and "next(b)" are not equivalent when b |
Georg, you're right, there's a StopIteration to catch. My thinko was next(b)
for x, y in zip(a, b): yield x, y ...which is not that attractive anymore, also because it's slower. Sorry |
Applied in r69908 . |
Nice. I had thought of this a while ago but found counter example, def f():
raise StopIteration
yield I didn't realize "next" had optional argument. |
Shame on me, I forgot about the optional argument too. |
great Raymond! :) |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: