On Dec 7, 12:45 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Fri, 07 Dec 2007 03:01:28 -0300, MonkeeSage <[EMAIL PROTECTED]> > escribió: > > > I've wondered about this myself. Seems to me, to prevent clobbering > > subclasses, __iadd__ (and all of the integer and float and whatever) > > methods that return new instances, should work like this (obviously I > > mean in the C backend, this is just to show the behavior): > > > def __iadd__(self, other): > > return self.__class__(self + other) > > This would slow down *all* of Python, and is only useful for those who > actually inherit from some builtin class (not so common) > > -- > Gabriel Genellina
I understand why it doesn't. It just *seems* like it should work that way when you first run into it (and has bitten me a couple times before). But then, I'm not Dutch. :) Regard, Jordan -- http://mail.python.org/mailman/listinfo/python-list