operator-invert

The unary ~ (invert) operator yields the bit-wise inversion of its plain or long integer argument. The bit-wise inversion of x is defined as -(x+1). It only applies to integral numbers.

Tf the argument does not have the proper type, a TypeError exception is raised.

To support this operator in your own classes, implement the __invert__ method.

 

A Django site. this page was rendered by a django application in 0.01s 2008-08-29 23:49:35.800559. hosted by webfaction.