why no ++?

Richard Brodie R.Brodie at rl.ac.uk
Fri Aug 3 06:30:31 EDT 2001


"Mark Robinson" <m.1.robinson at herts.ac.uk> wrote in message news:3B6A6B97.2060306 at herts.ac.uk...

> I guess it is perhaps not as clear, but I am not aware of it being a
> common cause of errors in C++ or java (doesn't mean it isn't, just that
> I am not aware of them). I also miss +=, *=, %=, /=, would it really
> make the code that much harder to read/maintain?

Using the magic of Guido's time machine, Python now supports += et al.
http://python.sourceforge.net/peps/pep-0203.html

++ is more tricky. If it returned a value, you would be able to write
things like x = y++ and x == y++. If not, it probably doesn't add
anything significant to the language.





More information about the Python-list mailing list