We're back after a server migration that caused effbot.org to fall over a bit harder than expected. Expect some glitches.

Unary arithmetic operations

All unary arithmetic (and bit-wise) operations have the same priority:

u_expr ::= power | “-” u_expr | “+” u_expr | “~” u_expr

See operator-neg.

See operator-pos.

See operator-invert.

In all three cases, if the argument does not have the proper type, a TypeError exception is raised.