inconsistency with += between different types ?
tjreedy at udel.edu
Wed Aug 7 19:19:22 CEST 2002
"Andreas Leitgeb" <Andreas.Leitgeb at siemens.at> wrote in message
> __iadd__ is SUPPOSED to modify self's attributes and then "return
Only if that is the sensible thing to do.
<suggestion to enforce above semantics by ignoring actual return and
> This would make sure that clean implementations would stay ok, while
> those implementations, that obfuscate the design of <op>= will
> phase out.
Python is not a nanny. It's a language for consenting adults. What
you do with your classes is your business. If you use someone else's
classes, it is your responsibility to consider the sanity of the
source -- and to test.
More information about the Python-list