Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Explained the pattern for special methods compatibility.

  • Loading branch information...
commit bfe25de42993fdbfccd4759f48ac6694e1ed32d9 1 parent 5306285
@aaugustin aaugustin authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  docs/topics/python3.txt
View
3  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
Please sign in to comment.
Something went wrong with that request. Please try again.