From bfe25de42993fdbfccd4759f48ac6694e1ed32d9 Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Fri, 19 Apr 2013 09:53:19 +0200 Subject: [PATCH] Explained the pattern for special methods compatibility. --- docs/topics/python3.txt | 3 +++ 1 file changed, 3 insertions(+) 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