Lawrence D'Oliveiro wrote: > I wonder how many people have been tripped up by the fact that > > ++n > > and > > --n > > fail silently for numeric-valued n.
I doubt that there are many. Plus, you misspelled them from the more obvious
n++
and
n--
which *do* fail with a SyntaxError. I think I faintly remember trying those
in my early Python days and immediately went for "+=" when I saw them fail
(as I had expected).
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
