Python has the usual bitwise operators, like ~, &, |, etc. and in-place operators like +=, &=, etc. to simplify expressions like:
a = a & 34234
a = a + 577
To:
a &= 34234
a += 577
Despite the complement operator ~ being an unary function, and not following the same structure because it isn't used with two values (like a and 34234), can expressions like these be simplified with another type of operator?
a = ~a # not bad at all
# Still easy to code but seems redundant
self.container.longVariableName.longName = ~self.container.longVariableName.longName