[issue16348] Decimal.remainder_near documentation incorrect.
New submission from Mark Dickinson: The documentation for Decimal.remainder_near is incorrect. It states: "If both are equally close, the one chosen will have the same sign as self." That's incorrect: instead, the chosen remainder has the property that it makes the corresponding quotient even rather than odd. E.g.,
Decimal(25).remainder_near(Decimal(10)) Decimal('5') Decimal(35).remainder_near(Decimal(10)) Decimal('-5')
---------- assignee: docs@python components: Documentation messages: 174039 nosy: docs@python, mark.dickinson priority: normal severity: normal stage: needs patch status: open title: Decimal.remainder_near documentation incorrect. versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue16348> _______________________________________
Mark Dickinson added the comment: Here's a doc patch. ---------- keywords: +patch Added file: http://bugs.python.org/file27766/issue16348.patch _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue16348> _______________________________________
Andrew Svetlov added the comment: LGTM ---------- nosy: +asvetlov _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue16348> _______________________________________
Roundup Robot added the comment: New changeset 1122f5bfc957 by Mark Dickinson in branch '2.7': Issue #16348: Fix incorrect documentation for Decimal.remainder_near. http://hg.python.org/cpython/rev/1122f5bfc957 New changeset 8570943ad5a2 by Mark Dickinson in branch '3.2': Issue #16348: Fix incorrect documentation for Decimal.remainder_near. http://hg.python.org/cpython/rev/8570943ad5a2 New changeset 9dc587378874 by Mark Dickinson in branch '3.3': Issue #16348: merge fix from 3.2. http://hg.python.org/cpython/rev/9dc587378874 New changeset 7b36ed59738c by Mark Dickinson in branch 'default': Issue #16348: merge fix from 3.3. http://hg.python.org/cpython/rev/7b36ed59738c ---------- nosy: +python-dev _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue16348> _______________________________________
Mark Dickinson added the comment: Thanks for reviewing, Andrew. ---------- assignee: docs@python -> mark.dickinson resolution: -> fixed status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue16348> _______________________________________
participants (3)
-
Andrew Svetlov -
Mark Dickinson -
Roundup Robot