whython icon indicating copy to clipboard operation
whython copied to clipboard

Unary ++ operator

Open pxeger opened this issue 4 years ago • 1 comments

An expression x++ would be equivalent to (x := x + 1).

  • It would have to be postfix only, to prevent ambiguity with +(+(x))
  • For maximum inconsistency with C, it should return the postincremented value

pxeger avatar Apr 19 '22 07:04 pxeger

Cool, but gonna be very hard to do without rewriting the parser. (afaik) Python has no postfix operators normally.

Also, how are you gonna distinguish it from a+ +b?

chunkybanana avatar Jul 07 '22 10:07 chunkybanana