[Tutor] Naive Questions
Michael Powe
michael@trollope.org
Sun Dec 1 19:31:20 2002
thank you. i didn't test, just looked in the various python books i have.
guess i need to update my library! (anything to buy more tech books! ;-)
mp
On Sun, Dec 01, 2002 at 06:23:00PM -0600, Tim Wilson wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Sunday 01 December 2002 18:17, Michael Powe wrote:
> > and just from curiosity, why are there no increment/decrement operators,
> > and nothing equivalent to += & its friends? i'd have thought this
> > would be a faq, but don't find anything about it there.
>
> There are. Doing x += 1 will increment x by 1. You can also do -=, /=, and
> *=. I think there may be more. This is a relatively recent addition, around
> Python 2.0 I think.
>
> - -Tim
>
> - --
> Tim Wilson
> Twin Cities, Minnesota, USA
> Science teacher, Linux fan, Zope developer, Grad. student, Daddy
> mailto:wilson@visi.com | http://qwerk.org/ | public key: 0x8C0F8813
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.7 (GNU/Linux)
>
> iD8DBQE96qfkB56RQ4wPiBMRAnXQAJwPRLIwNMSkA0YCcqgpFiwAWGlnTACfQFzS
> Dq8XKD+EETcw/ujQTxZELu8=
> =E/1D
> -----END PGP SIGNATURE-----