Suggestion for "syntax error": ++i, --i

Pierre Barbier de Reuille pierre.barbier at cirad.fr
Tue Dec 14 06:29:03 EST 2004


Christian Ergh a écrit :
> Hmm, i never liked the i++ syntax, because there is a value asignment 
> behind it and it does not show - except the case you are already used to 
> it.
> 
>  >>> i = 1
>  >>> i +=1
>  >>> i
> 2
> 
> I like this one better, because you see the assignment at once, it is 
> easy to read and inuitive usability is given - in my opinion.
> Chris
> 

IMO, there is an assignement only for languages like python ! (ie. 
reference languages)

In languages like C or C++ (in which variables correspond to values) it 
makes perfect sens to modify the current value by an operator.

Nevertheless, I agree with you concerning Python ! But not for C++ :)

Pierre



More information about the Python-list mailing list