Convert a string or number to an integer, if possible. A floating point
argument will be truncated towards zero (this does not include a string
representation of a floating point number!) When converting a string, use
the optional base. It is an error to supply a base when converting a
non-string. If base is zero, the proper base is guessed based on the
string content. If the argument is outside the integer range a
long object will be returned instead.
|
|
__abs__(x)
x.__abs__() <==> abs(x) |
|
|
|
|
__add__(x,
y)
x.__add__(y) <==> x+y |
|
|
|
|
__and__(x,
y)
x.__and__(y) <==> x&y |
|
|
|
|
__cmp__(x,
y)
x.__cmp__(y) <==> cmp(x,y) |
|
|
|
|
__coerce__(x,
y)
x.__coerce__(y) <==> coerce(x, y) |
|
|
|
|
__div__(x,
y)
x.__div__(y) <==> x/y |
|
|
|
|
__divmod__(x,
y)
x.__divmod__(y) <==> divmod(x, y) |
|
|
|
|
__float__(x)
x.__float__() <==> float(x) |
|
|
|
|
__floordiv__(x,
y)
x.__floordiv__(y) <==> x//y |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
__hex__(x)
x.__hex__() <==> hex(x) |
|
|
|
|
__index__(...)
x[y:z] <==> x[y.__index__():z.__index__()] |
|
|
|
|
__int__(x)
x.__int__() <==> int(x) |
|
|
|
|
__invert__(x)
x.__invert__() <==> ~x |
|
|
|
|
__long__(x)
x.__long__() <==> long(x) |
|
|
|
|
__lshift__(x,
y)
x.__lshift__(y) <==> x<<y |
|
|
|
|
__mod__(x,
y)
x.__mod__(y) <==> x%y |
|
|
|
|
__mul__(x,
y)
x.__mul__(y) <==> x*y |
|
|
|
|
__neg__(x)
x.__neg__() <==> -x |
|
|
|
a new object with type S, a subtype of T
|
__new__(T,
S,
...)
T.__new__(S, ...) -> a new object with type S, a subtype of T |
|
|
|
|
__nonzero__(x)
x.__nonzero__() <==> x != 0 |
|
|
|
|
__oct__(x)
x.__oct__() <==> oct(x) |
|
|
|
|
__or__(x,
y)
x.__or__(y) <==> x|y |
|
|
|
|
__pos__(x)
x.__pos__() <==> +x |
|
|
|
|
__pow__(x,
y,
z=...)
x.__pow__(y[, z]) <==> pow(x, y[, z]) |
|
|
|
|
__radd__(x,
y)
x.__radd__(y) <==> y+x |
|
|
|
|
__rand__(x,
y)
x.__rand__(y) <==> y&x |
|
|
|
|
__rdiv__(x,
y)
x.__rdiv__(y) <==> y/x |
|
|
|
|
__rdivmod__(x,
y)
x.__rdivmod__(y) <==> divmod(y, x) |
|
|
|
|
|
|
|
__rfloordiv__(x,
y)
x.__rfloordiv__(y) <==> y//x |
|
|
|
|
__rlshift__(x,
y)
x.__rlshift__(y) <==> y<<x |
|
|
|
|
__rmod__(x,
y)
x.__rmod__(y) <==> y%x |
|
|
|
|
__rmul__(x,
y)
x.__rmul__(y) <==> y*x |
|
|
|
|
__ror__(x,
y)
x.__ror__(y) <==> y|x |
|
|
|
|
__rpow__(y,
x,
z=...)
y.__rpow__(x[, z]) <==> pow(x, y[, z]) |
|
|
|
|
__rrshift__(x,
y)
x.__rrshift__(y) <==> y>>x |
|
|
|
|
__rshift__(x,
y)
x.__rshift__(y) <==> x>>y |
|
|
|
|
__rsub__(x,
y)
x.__rsub__(y) <==> y-x |
|
|
|
|
__rtruediv__(x,
y)
x.__rtruediv__(y) <==> y/x |
|
|
|
|
__rxor__(x,
y)
x.__rxor__(y) <==> y^x |
|
|
|
|
|
|
|
__sub__(x,
y)
x.__sub__(y) <==> x-y |
|
|
|
|
__truediv__(x,
y)
x.__truediv__(y) <==> x/y |
|
|
|
|
__trunc__(...)
Truncating an Integral returns itself. |
|
|
|
|
__xor__(x,
y)
x.__xor__(y) <==> x^y |
|
|
|
|
conjugate(...)
Returns self, the complex conjugate of any int. |
|
|
|
Inherited from object:
__delattr__,
__init__,
__reduce__,
__reduce_ex__,
__setattr__,
__sizeof__,
__subclasshook__
|