inconsistency with += between different types ?

Delaney, Timothy tdelaney at avaya.com
Fri Aug 9 01:31:26 CEST 2002


> class I:
> 
>     def __add__(self, other):
>         ...
>         return self
> 
>     __radd__ = __iadd__
                   ^
>     __iadd__ = __add__

Of course, I included a typo ... that should of course have been

    __radd__ = __add__

Would have been caught the first time the module was imported ;)

Tim Delaney




More information about the Python-list mailing list