GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — bpo-31270: Simplify documentation of itertools.zip_longest by raphaelm · Pull Request #3200 · python/cpython

Conversation

@raphaelm

@raphaelm raphaelm commented Aug 24, 2017 •
edited by bedevere-bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

https://bugs.python.org/issue31270

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@raphaelm
bpo-31270: Simplify documentation of itertools.zip_longest
540439a
@the-knights-who-say-ni

the-knights-who-say-ni commented Aug 24, 2017

Copy link
Copy Markdown

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA).

Unfortunately our records indicate you have not signed the CLA. For legal reasons we need you to sign this before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

Thanks again to your contribution and we look forward to looking at it!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@the-knights-who-say-ni the-knights-who-say-ni added the CLA not signed label Aug 24, 2017
@bedevere-bot bedevere-bot added the awaiting review label Aug 24, 2017
@raphaelm

raphaelm commented Aug 24, 2017

Copy link
Copy Markdown
Author

CLA is signed and submitted. Do I need to write a NEWS entry for this? I think it's rather "skip news", right?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Mariatta

Mariatta commented Aug 24, 2017

Copy link
Copy Markdown
Member

Thanks @raphaelm, I think news can be skipped for this one :)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Mariatta Mariatta added skip news docs Documentation in the Doc dir labels Aug 24, 2017
@Mariatta
Mariatta requested a review from rhettinger August 24, 2017 16:19
@Mariatta Mariatta added the needs backport to 3.6 label Aug 24, 2017
@raphaelm

raphaelm commented Aug 24, 2017

Copy link
Copy Markdown
Author

Hi @Mariatta, thanks for the quick answer! :)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@rhettinger rhettinger self-assigned this Aug 24, 2017
@Mariatta Mariatta removed the CLA not signed label Aug 29, 2017
@the-knights-who-say-ni the-knights-who-say-ni added the CLA signed label Aug 29, 2017
@rhettinger

rhettinger commented Sep 6, 2017 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

I prefer code that is closer to the actual implementation:

    def zip_longest(*args, **kwds):
        # zip_longest('ABCD', 'xy', fillvalue='-') --> Ax By C- D-
        fillvalue = kwds.get('fillvalue')
        iterators = [iter(it) for it in args]
        num_active = len(iterators)
        while True:
            values = []
            for i, it in enumerate(iterators):
                if it is None:
                    value = fillvalue
                else:
                    try:
                        value = next(it)
                    except StopIteration:
                        num_active -= 1
                        value = fillvalue
                        iterators[i] = None
                values.append(value)
            if not num_active:
                return
            yield tuple(values)

Also, please keep the leading whitespace the same as the original. Likewise, don't introduce blank lines into the code equivalents.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

rhettinger
rhettinger requested changes Sep 6, 2017
View reviewed changes

@rhettinger rhettinger left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

See alternate implementation in the comments.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-bot

bedevere-bot commented Sep 6, 2017

Copy link
Copy Markdown

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I didn't expect the Spanish Inquisition!. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot added awaiting changes and removed awaiting review labels Sep 6, 2017
@rhettinger

rhettinger commented Sep 7, 2017

Copy link
Copy Markdown
Contributor

Moving this to an alternate pull request #3427

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@rhettinger rhettinger closed this Sep 7, 2017
@serhiy-storchaka serhiy-storchaka removed the needs backport to 3.6 label Sep 27, 2017
@Mariatta Mariatta removed the awaiting changes label Oct 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@rhettinger rhettinger rhettinger requested changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@rhettinger rhettinger

Labels

docs Documentation in the Doc dir skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@raphaelm @the-knights-who-say-ni @Mariatta @rhettinger @bedevere-bot @serhiy-storchaka
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.