I don't know if this is a bug in 3.1, but if I remember correctly "inline" division worked like this in pre-3k versions:
Python 3.1 (r31:73574, Jun 26 2009, 20:21:35) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> class A:
... def __init__(self, x):
... self.x = x
... def __idiv__(self, y):
... self.x /= y
...
>>> a = A(5)
>>> a /= 2
However, 3.1 gives me this:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: unsupported operand type(s) for /=: 'A' and 'int'
... or am I missing something?