Dick Moores wrote: > The docs list it at <http://docs.python.org/ref/augassign.html>, and > send you to <http://docs.python.org/ref/primaries.html#primaries>, > which seems a dead end.
a += n is more-or-less a shortcut for a = a + n. There are a few subtleties which the first page you reference talks about, but you can generally think of it as a handy abbreviation. For other operations, the same is true: a <op>= n is the same as a = a <op> n > I've tried "^=" out a bit and get that strange alternating behavior. which is normal operation of ^. Try it with + or * for a simpler example. Kent _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor