by tef__ · 16y ago · 0 comments
fwiw: this works in python too
>>> class Foo(object): ... def __add__(self, x): ... print "%s+%s"%(self,x) ... >>> a = Foo() >>> a+=8 <__main__.Foo object at 0x657d0>+8 >>>
You can override __iadd__ separately too.
No comments yet.