[New-bugs-announce] [issue10676] Confusing note in Numeric Types

Philip Bober report at bugs.python.org
Fri Dec 10 21:25:46 CET 2010

New submission from Philip Bober <pdbober at gmail.com>:

In the Python Standard Library reference, section 5.4: Numeric Types, the table of operators/functions has the following unclear note:

(4)Complex floor division operator, modulo operator, and divmod().
   Deprecated since version 2.3: Instead convert to float using abs() if appropriate.

The intention of this note is to indicate that //,%, and divmod shouldn't be used with complex numbers, but the phrasing is bad and the note being on generic operators makes it sound like the operators themselves are deprecated, not just for complex numbers. 

There was an earlier bugfix (621708, on the previous tracker. Archive: http://mail.python.org/pipermail/python-bugs-list/2002-October/013913.html) which fixed this bad wording elsewhere in the docs (Section 5.6 Binary arithmetic operations in the Python Reference Manual) but it seems the same wording was in both documents and it was only patched in one of them. 

It was replaced with:
"Deprecated since version 2.3: The floor division operator, the modulo operator, and the divmod() function are no longer defined for complex numbers. Instead, convert to a floating point number using the abs() function if appropriate."

assignee: docs at python
components: Documentation
messages: 123750
nosy: Philip.Bober, docs at python
priority: normal
severity: normal
status: open
title: Confusing note in Numeric Types
versions: Python 2.5, Python 2.6, Python 2.7

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list