classification
Title: __div__ still documented in Python 3
Type: Stage:
Components: Documentation Versions: Python 3.0
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: georg.brandl Nosy List: georg.brandl, mgiuca
Priority: normal Keywords: patch

Created on 2008-09-06 13:54 by mgiuca, last changed 2008-09-06 17:44 by georg.brandl. This issue is now closed.

Files
File name Uploaded Description Edit
datamodel.patch mgiuca, 2008-09-06 13:54
Messages (3)
msg72669 - (view) Author: Matt Giuca (mgiuca) Date: 2008-09-06 13:54
The "special method names" section of the Python 3.0 documentation still
mentions the __div__ method. I believe this method has been totally
removed in Python 3 in favour of __truediv__. (Perhaps I am mistaken,
but 'int' object has no attribute '__div__', so I assume this is correct).

Note here:
http://docs.python.org/dev/3.0/reference/datamodel.html#object.__div__

__div__ is still documented. Most of the __div__/__truediv__ section
describes the issues distinguishing the two. Now that __div__ is gone,
surely there is no need for this section, and __truediv__ can just be
pushed up above with all the other operators?

Attached a patch doing that. Also deleted __rdiv__ and __idiv__ from the
following sections. (And one minor extra fix: added ``//`` to the list
of operators in reflected methods, since it was missing - note this
required a reflow of text, which is why the diff shows the whole
paragraph changing).

Change log:

Doc/reference/datamodel.rst: Removed section under "emulating numeric
types" about difference between __div__ and __truediv__, since __div__
has been removed from the language. Also deleted __rdiv__ and __idiv__
from the following sections, also removed.
msg72674 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2008-09-06 17:43
Fixed in r66260.
msg72676 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2008-09-06 17:44
Uh, I meant r66261. Thanks for the patch!
History
Date User Action Args
2008-09-06 17:44:02georg.brandlsetmessages: + msg72676
2008-09-06 17:43:00georg.brandlsetstatus: open -> closed
resolution: fixed
messages: + msg72674
2008-09-06 13:54:30mgiucacreate