Why is there no post-pre increment operator in python

Mike Meyer mwm at mired.org
Fri Jan 13 05:15:58 CET 2006

riteshtijoriwala at gmail.com 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)) and -(-(j)).

Mike Meyer <mwm at mired.org>			http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.

More information about the Python-list mailing list