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-24076: Fix reference in sum() introduced by GH-28469 by pablogsal · Pull Request #28493 · python/cpython

Conversation

@pablogsal

@pablogsal pablogsal commented Sep 21, 2021 •
edited by bedevere-bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

https://bugs.python.org/issue24076

Sorry, something went wrong.

Uh oh!

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

All reactions
@pablogsal
bpo-24076: Fix reference in sum() introduced by pythonGH-28469
bd121ec
@the-knights-who-say-ni the-knights-who-say-ni added the CLA signed label Sep 21, 2021
@bedevere-bot bedevere-bot added the awaiting core review label Sep 21, 2021
This was referenced Sep 21, 2021
bpo-45256: Remove the usage of the C stack in Python to Python calls #28488
Merged
bpo-24076: Inline single digit unpacking in the integer fastpath of sum() #28469
Merged
rhettinger
rhettinger reviewed Sep 21, 2021
View reviewed changes
Comment thread Python/bltinmodule.c Outdated
switch (Py_SIZE(item)) {
case -1: b = -(sdigit) ((PyLongObject*)item)->ob_digit[0]; break;
case 0: continue;
case 0: Py_DECREF(item); continue;

@rhettinger rhettinger Sep 21, 2021

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.

I'm thinking that the "continue" warrants a comment. Inside a switch-case, a break ends a case but a continue means to go to the top of the loop. The side-by-side use of break and continue is a bit confusing (I did a double take when I first saw it); hence, my suggestion to add a comment.

Sorry, something went wrong.

Uh oh!

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

All reactions

@pablogsal pablogsal Sep 21, 2021

Copy link
Copy Markdown
Member Author

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.

👍

Sorry, something went wrong.

Uh oh!

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

All reactions

@pablogsal pablogsal Sep 21, 2021

Copy link
Copy Markdown
Member Author

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.

Agreed. I actually didn't add it before to keep the PR contained. But makes sense. I have pushed a comment in the new commit

Sorry, something went wrong.

Uh oh!

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

All reactions
@pablogsal pablogsal added the skip news label Sep 21, 2021
@pablogsal
Add a comment for the 'continue' case
a79b4bf
@pablogsal
pablogsal merged commit 1c7e98d into python:main Sep 21, 2021
@pablogsal
pablogsal deleted the bpo-24076 branch September 21, 2021 17:38
@bedevere-bot bedevere-bot removed the awaiting core review label Sep 21, 2021
@markshannon markshannon mentioned this pull request Sep 23, 2021
Drop test for tracing and inline coroutine creation pablogsal/cpython#16
Merged
@ambv ambv mentioned this pull request Oct 20, 2022
sum() several times slower on Python 3 64-bit #68264
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@rhettinger rhettinger rhettinger left review comments

Uh oh!

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

Assignees

No one assigned

Labels

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.

4 participants

@pablogsal @rhettinger @the-knights-who-say-ni @bedevere-bot
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.