Title: Confusing note in Numeric Types
Type: Stage:
Components: Documentation Versions: Python 2.7, Python 2.6, Python 2.5
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: Philip.Bober, docs@python, georg.brandl
Priority: normal Keywords:

Created on 2010-12-10 20:25 by Philip.Bober, last changed 2010-12-11 08:10 by georg.brandl. This issue is now closed.

Messages (2)
msg123750 - (view) Author: Philip Bober (Philip.Bober) Date: 2010-12-10 20:25
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: 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."
msg123781 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2010-12-11 08:10
Thanks, fixed in r87169.
Date User Action Args
2010-12-11 08:10:44georg.brandlsetstatus: open -> closed

nosy: + georg.brandl
messages: + msg123781

resolution: fixed
2010-12-10 20:25:44Philip.Bobercreate