inconsistency with += between different types ?

Delaney, Timothy tdelaney at avaya.com
Thu Aug 8 19:31:26 EDT 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