No, there is not. Integers are inmutable types, so you cannot modify them
in place, so you do:
i += 1
or
i = i+1
which creates a new integer and makes "i" reference it.
Hugo
> Hello
>Is there a increment operator in python similar to c++
> like so "SomeVariable++"
>
> __
On Fri, 27 May 2005, Lee Cullens wrote:
> I find the following invaluable - maybe you will also.
>
> http://rgruet.free.fr/PQR24/PQR2.4.html
That's a great resource. Thanks.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listin
> Is there a increment operator in python similar to c++
> like so "SomeVariable++"
No.
There is the shorthand += assignment but no ++
So x += 1
is the closest thing to x++
HTH,
Alan G.
___
Tutor maillist - Tutor@python.org
http://mail.python.or
At 08:25 PM 5/27/2005, Servando Garcia wrote:
Is there an increment operator
in python similar to c++ like SomeVariable++
No. Closest is SomeVariable += 1.
Bob Gailer
mailto:[EMAIL PROTECTED]
510 558 3275 home
720 938 2625 cell
___
Tutor maillist -
I find the following invaluable - maybe you will also.
http://rgruet.free.fr/PQR24/PQR2.4.html
Lee C
On May 27, 2005, at 11:25 PM, Servando Garcia wrote:
> Hello
> Is there a increment operator in python similar to c++
> like so "SomeVariable++"
>
> __
Hello
Is there a increment operator in python similar to c++
like so "SomeVariable++"
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor