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 — Update programming.rst by kgashok · Pull Request #2768 · python/cpython

Conversation

@kgashok

@kgashok kgashok commented Jul 19, 2017

Copy link
Copy Markdown

missing negative sign added.

Sorry, something went wrong.

Uh oh!

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

All reactions
@kgashok
Update programming.rst
612d01e
@the-knights-who-say-ni the-knights-who-say-ni added the CLA not signed label Jul 19, 2017
@marco-buttu

marco-buttu commented Jul 20, 2017

Copy link
Copy Markdown
Contributor

Hi @kgashok, could you please open an issue on http://bugs.python.org/, as described in the devguide? I am not sure this is a documentation bug, because IMHO it is not clear what the example wants to emphasize. I am not a native English speaker, but the first sentence of the section seems wrong to me. We will discuss it in http://bugs.python.org/

All reactions

Sorry, something went wrong.

Uh oh!

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

terryjreedy
terryjreedy reviewed Jul 24, 2017
View reviewed changes
Comment thread Doc/faq/programming.rst
``i % j`` to be ``>= 0``. If the clock says 10 now, what did it say 200 hours
ago? ``-190 % 12 == 2`` is useful; ``-190 % 12 == -10`` is a bug waiting to
ago? ``-190 % 12 == 2`` is useful; ``-190 % -12 == -10`` is a bug waiting to
bite.

@terryjreedy terryjreedy Jul 24, 2017 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

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.

The trivial correction is wrong, and it misses the point of the 'False' equality. If -190 % 12 were -10 instead of 2, it would be less useful and possibly lead to bugs.

Sorry, something went wrong.

Uh oh!

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

All reactions
@terryjreedy

terryjreedy commented Jul 24, 2017 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

I opened bpo-31021 to propose a correct change to what is a confusing hypothetical.

All reactions

Sorry, something went wrong.

Uh oh!

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

@terryjreedy terryjreedy closed this Jul 24, 2017
@terryjreedy terryjreedy removed the CLA not signed label Jul 25, 2017
@the-knights-who-say-ni the-knights-who-say-ni added the CLA signed label Jul 25, 2017
@python python deleted a comment from the-knights-who-say-ni Jul 25, 2017
@kgashok
kgashok deleted the patch-2 branch August 28, 2017 01:54
@terryjreedy terryjreedy mentioned this pull request Jan 25, 2025
Clarify int division programming faq #75204
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@terryjreedy terryjreedy terryjreedy left review comments

Uh oh!

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

Assignees

No one assigned

Labels

None yet

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

@kgashok @marco-buttu @terryjreedy @the-knights-who-say-ni
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.