Augmented assignment (ie. += and friends) for Python!
Michael Hudson
mwh21 at cam.ac.uk
Fri May 12 14:30:47 EDT 2000
Michael Hudson <mwh21 at cam.ac.uk> writes:
> You can read about it and find a patch here:
>
> http://starship.python.net/crew/mwh/aug-patch.html
>
> Questions, comments, flames, praise, abuse - all welcome.
Well, that provoked a lot of noise, didn't it?
Undeterred I have put a new version of the patch on starship. The
main change is to support more operators; I now support
+= -= *= /= %= &= ^= |= <<= >>= **=
(does C have &&= and ||=? I can't remember, and Python's not getting
them anyway).
The patch also contains the changes to the built grammar, so you don't
need to rebuild it to try the patch, but it's bigger.
Cheers,
M.
--
48. The best book on programming for the layman is "Alice in
Wonderland"; but that's because it's the best book on
anything for the layman.
-- Alan Perlis, http://www.cs.yale.edu/~perlis-alan/quotes.html
More information about the Python-list
mailing list