Is it just Syntactic Sugar ?

Johann Hibschman johann at
Tue May 30 16:12:53 EDT 2000

Thomas Wouters writes:

> No, I have more faith in the idea that += is an *in place* add, for mutable
> types.

But then it loses its most basic utility, namely working with
integers.  An integer is not a mutable type.

A simple rewrite is the only way to make sense of

  i += 1  -> i = i + 1

if i is an integer, given the existing python variable semantics.

Johann Hibschman                           johann at

More information about the Python-list mailing list