summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2015-02-27 20:10:03 (GMT)
committerBrett Cannon <brett@python.org>2015-02-27 20:10:03 (GMT)
commitfdde79dbf6ae6d1d3b15770a2e87a5108197d826 (patch)
treeb613b8d06aeae8a4c067324b13ffcc4764c9ed17 /Doc
parentc332f8a4920f11a2acad55abe5592afa94527723 (diff)
downloadcpython-fdde79dbf6ae6d1d3b15770a2e87a5108197d826.zip
cpython-fdde79dbf6ae6d1d3b15770a2e87a5108197d826.tar.gz
cpython-fdde79dbf6ae6d1d3b15770a2e87a5108197d826.tar.bz2
Fix the clarification as to why division cannot be ported automatically
Diffstat (limited to 'Doc')
-rw-r--r--Doc/howto/pyporting.rst5
1 files changed, 3 insertions, 2 deletions
diff --git a/Doc/howto/pyporting.rst b/Doc/howto/pyporting.rst
index bd80dfd..d2cd9de 100644
--- a/Doc/howto/pyporting.rst
+++ b/Doc/howto/pyporting.rst
@@ -169,8 +169,9 @@ things:
division or continue using ``/`` and expect a float
The reason that ``/`` isn't simply translated to ``//`` automatically is that if
-an object defines its own ``__div__`` method but not ``__floordiv__`` then your
-code would begin to fail.
+an object defines a ``__truediv__`` method but not ``__floordiv__`` then your
+code would begin to fail (e.g. a user-defined class that uses ``/`` to
+signify some operation but not ``//`` for the same thing or at all).
Text versus binary data
+++++++++++++++++++++++