GeezerVison is showing github.com — Update programming.rst by kgashok · Pull Request #2768 · python/cpython
Conversation
missing negative sign added.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
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/
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
``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.
|
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.
terryjreedy
commented
Jul 24, 2017
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|
I opened bpo-31021 to propose a correct change to what is a confusing hypothetical.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
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.
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.