summaryrefslogtreecommitdiff
path: root/docs/topics/python3.txt
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2013-04-19 09:53:19 +0200
committerAymeric Augustin <aymeric.augustin@m4x.org>2013-04-19 09:53:50 +0200
commitbfe25de42993fdbfccd4759f48ac6694e1ed32d9 (patch)
tree4a7e71dfc46bc85856ed346553a6632bb731189b /docs/topics/python3.txt
parent5306285ce21d59742d67a447c9c1a1e4be6d86a4 (diff)
Explained the pattern for special methods compatibility.
Diffstat (limited to 'docs/topics/python3.txt')
-rw-r--r--docs/topics/python3.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/docs/topics/python3.txt b/docs/topics/python3.txt
index 33f5fcd4c0..22e609c75c 100644
--- a/docs/topics/python3.txt
+++ b/docs/topics/python3.txt
@@ -317,6 +317,9 @@ Division
def __idiv__(self, other): # Python 2 compatibility
return type(self).__itruediv__(self, other)
+Special methods are looked up on the class and not on the instance to reflect
+the behavior of the Python interpreter.
+
.. module: django.utils.six
Writing compatible code with six