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: Confusing note in Numeric Types
Type: Stage:
Components: Documentation Versions: Python 2.7, Python 2.6, Python 2.5
process
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 2022-04-11 14:57 by admin. 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: 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."
msg123781 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2010-12-11 08:10
Thanks, fixed in r87169.
History
Date User Action Args
2022-04-11 14:57:10adminsetgithub: 54885
2010-12-11 08:10:44georg.brandlsetstatus: open -> closed

nosy: + georg.brandl
messages: + msg123781

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