"gene tani" wrote:
> pls don't hijack threads
this is usenet, not gene tani's web board.
if you have trouble dealing with subthreads, get a better news reader.
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> Anyone has any idea on why is there no post/pre increment operators in
> python ?
> Although the statement:
> ++j
> works but does nothing
The reason is pretty complex, but here it is: Python is not C.
-Peter
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> Anyone has any idea on why is there no post/pre increment operators in
> python ?
Short answer: Because Guido didn't like them.
Longer answer: Because they encourage people to write cryptic one-liners.
There really isn't anything you can't write with them that you c
[EMAIL PROTECTED] wrote:
> Anyone has any idea on why is there no post/pre increment operators in
> python ?
> Although the statement:
> ++j
> works but does nothing
"+=1" and "-=1" inflate your KLOC by .001, but they always work as
expected with integers, it's when you do augmented assignments
[EMAIL PROTECTED] writes:
> Anyone has any idea on why is there no post/pre increment operators in
> python ?
For lots of good reasons.
> Although the statement:
> ++j
> works but does nothing
So does --j. They both parse as a value with two unary operators
applied to it in succession: +(+(j)
[EMAIL PROTECTED]
> Anyone has any idea on why is there no post/pre increment operators in
> python ?
Maybe because Python doesn't aim at being a cryptic portable assembly
language? That's my guess ;-)
> Although the statement:
> ++j
> works but does nothing
That depends on the type of j, and h