Google

LINK="#0000bb" VLINK="#551a8b" ALINK="#ff0000">

Objects of the univ.Integer class

Instances of univ.Integer class implement Python numeric object protocol by means of the following additional methods:

__add__(value)
__sub__(value)
__mul__(value)
__div__(value)
__mod__(value)
__pow__(value[,modulo ])
__lshift__(value)
__rshift__(value)
__and__(value)
__or__(value)
__xor__(value)

These methods implement the binary arithmetic operations (+, -, *, /, %, pow **, <<, >>, &, ^, |) against the value and return a instance of Integer object initialized to the result of the arithmetic operation.

__radd__(value)
__rsub__(value)
__rmul__(value)
__rdiv__(value)
__rmod__(value)
__rpow__(value[,modulo ])
__rlshift__(value)
__rrshift__(value)
__rand__(value)
__ror__(value)
__rxor__(value)

These methods implement the binary arithmetic operations (+, -, *, /, %, pow **, <<, >>, &, ^, |) against the value with reflected (swapped) operands, and return a instance of Integer object initialized to the result of the arithmetic operation.

The folowing set of methods can be called only by Python version 1.6 and later.

__iadd__(value)
__isub__(value)
__imul__(value)
__idiv__(value)
__imod__(value)
__ipow__(value[,modulo ])
__ilshift__(value)
__irshift__(value)
__iand__(value)
__ior__(value)
__ixor__(value)

These methods implement in-place arithmetic operations (+=, -=, *=, /=, %=, **=, <<=, >>=, &=, ^=, |=) against the value and return an instance of ourselves (self).

__int__()
__long__()
__float__()

Returns a value of the appropriate type.


ilya@glas.net