Message361171
Marco, this is no more of a defect than `x*-y` or `a&~b`. It is a binary
operator followed by an unary operator, just like `x--y`, `x/-y`,
`x+-y`, `x**-y` etc. Python has at least three unary operators and at
least 17 binary operators so in total there are 51 possible legal
combinations of a binary operator followed by an unary operator.
`++` isn't special, it's not unique, or a defect, or a bug.
> 1++
> ^
> SyntaxError: invalid syntax
As a programmer with more than 10 years experience, you should know that
this example is a syntax error because you are missing the right hand
operand, not because `++` has no meaning. You would get precisely the
same syntax error with `2*` or `2==`. |
|
Date |
User |
Action |
Args |
2020-02-01 15:34:13 | steven.daprano | set | recipients:
+ steven.daprano, Marco Sulla |
2020-02-01 15:34:13 | steven.daprano | link | issue39516 messages |
2020-02-01 15:34:13 | steven.daprano | create | |
|