inconsistency with += between different types ?

Andreas Leitgeb Andreas.Leitgeb at
Mon Aug 5 23:09:34 CEST 2002

Mark McEahern <marklists at> wrote:
>> It seems that  lists are the only type, where the changes get visible
>> outside, although I'd have expected all types to behave as lists do.
> lists are mutable.  strings and ints aren't.

and someone else wrote:
" even mutable objects may define their __iadd__ to do an assignment.

That makes of course sense ...

thanks to all who answered. 

Newsflash: Sproingy made it to the ground !
  read more ... <>

More information about the Python-list mailing list