Equivalent in Python?

James J. Besemer jb at cascade-sys.com
Mon Apr 29 21:00:55 EDT 2002


Philip Swartzleonard wrote:

> James J. Besemer || Mon 29 Apr 2002 03:11:25p:
>
> But if you just want to increment something, use 'foo+=1'.

Good point.  It may fill the immediate need.

> Exactly the
> same, except one more character and only works on a line of it's own

Well, it's not at all exactly the same.

It's more akin to Perl's "+=" operator, but even then still quite a bit
different, being a statement instead of an operator.

Regards

--jb

--
James J. Besemer  503-280-0838 voice
http://cascade-sys.com  503-280-0375 fax
mailto:jb at cascade-sys.com







More information about the Python-list mailing list