Steven D'Aprano <steve+pyt...@pearwood.info> added the comment:
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==`. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue39516> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com