n++ < 10 syntax error??

Tal Linzen pachy at 012.net.il
Sun Jan 13 15:45:36 EST 2002


> Python doesn't have the ++ autoincrement operator.  + is a unary operator
> on a numeric arg, that does nothing.  ++n is the same as n.

Why is a construct like ++n or --n even allowed? I can't think of a context
where it's useful,
and it's evidently misleading for beginners with C background.

Tal





More information about the Python-list mailing list