Why is there no post-pre increment operator in python
Mike Meyer
mwm at mired.org
Thu Jan 12 23:15:58 EST 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
--
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