homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Integer operations (// or %) on negative numbers product wrong results.
Type: behavior Stage: resolved
Components: Versions: Python 3.4
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: Antoon, eric.smith
Priority: normal Keywords:

Created on 2015年04月12日 21:54 by Antoon, last changed 2022年04月11日 14:58 by admin. This issue is now closed.

Messages (2)
msg240569 - (view) Author: Antoon Houben (Antoon) Date: 2015年04月12日 21:54
-17 // 3 should produce -5 but is currently producing -6
-17 % 3 should produce 2 but is currently producing 1
msg240574 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2015年04月12日 23:46
This is the expected behavior: https://docs.python.org/2/faq/programming.html#why-does-22-10-return-3 
History
Date User Action Args
2022年04月11日 14:58:15adminsetgithub: 68111
2015年04月12日 23:46:35eric.smithsetstatus: open -> closed

nosy: + eric.smith
messages: + msg240574

resolution: not a bug
stage: resolved
2015年04月12日 21:54:03Antooncreate

AltStyle によって変換されたページ (->オリジナル) /