Skip to content
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

bpo-32099: Add comment and improve variable name in roundrobin() recipe #4486

Merged
merged 1 commit into from
Nov 21, 2017

Conversation

rhettinger
Copy link
Contributor

@rhettinger rhettinger commented Nov 21, 2017

try:
for next in nexts:
yield next()
except StopIteration:
pending -= 1
nexts = cycle(islice(nexts, pending))
# Remove the iterator we just exhausted from the cycle.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Large +1 for the comment!

@rhettinger rhettinger merged commit 337cbba into python:master Nov 21, 2017
@miss-islington
Copy link
Contributor

Thanks @rhettinger for the PR 🌮🎉.. I'm working now to backport this PR to: 3.6.
🐍🍒⛏🤖

@rhettinger rhettinger deleted the roundrobin branch November 21, 2017 08:23
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 21, 2017
@bedevere-bot
Copy link

GH-4487 is a backport of this pull request to the 3.6 branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants