Module __builtin__ :: Class int
[show private | hide private]
[frames | no frames]

Class int

object --+
         |
        int


int(x[, base]) -> integer

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.
Method Summary
  __init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature (inherited from object)
  __abs__(x)
Return abs(x)
  __add__(x, y)
Return x+y
  __and__(x, y)
Return x&y
  __cmp__(x, y)
Return cmp(x,y)
  __coerce__(x, y)
Return coerce(x, y)
  __delattr__(...)
x.__delattr__('name') <==> del x.name (inherited from object)
  __div__(x, y)
Return x/y
  __divmod__(x, y)
Return xdivmod(x, y)y
  __float__(x)
Return float(x)
  __floordiv__(x, y)
Return x//y
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
Return hash(x)
  __hex__(x)
Return hex(x)
  __int__(x)
Return int(x)
  __invert__(x)
Return ~x
  __long__(x)
Return long(x)
  __lshift__(x, y)
Return x<<y
  __mod__(x, y)
Return x%y
  __mul__(x, y)
Return x*y
  __neg__(x)
Return -x
  __new__(T, S, ...)
Return a new object with type S, a subtype of T (inherited from type)
  __nonzero__(x)
Return x != 0
  __oct__(x)
Return oct(x)
  __or__(x, y)
Return x|y
  __pos__(x)
Return +x
  __pow__(x, y, z)
Return pow(x, y[, z])
  __radd__(x, y)
Return y+x
  __rand__(x, y)
Return y&x
  __rdiv__(x, y)
Return y/x
  __rdivmod__(x, y)
Return ydivmod(y, x)x
  __reduce__(...)
helper for pickle (inherited from object)
  __repr__(x)
Return repr(x)
  __rfloordiv__(x, y)
Return y//x
  __rlshift__(x, y)
Return y<<x
  __rmod__(x, y)
Return y%x
  __rmul__(x, y)
Return y*x
  __ror__(x, y)
Return y|x
  __rpow__(y, x, z)
Return pow(x, y[, z])
  __rrshift__(x, y)
Return y>>x
  __rshift__(x, y)
Return x>>y
  __rsub__(x, y)
Return y-x
  __rtruediv__(x, y)
Return y/x
  __rxor__(x, y)
Return y^x
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value (inherited from object)
  __str__(x)
Return str(x)
  __sub__(x, y)
Return x-y
  __truediv__(x, y)
Return x/y
  __xor__(x, y)
Return x^y

Method Details

__abs__(x)

Returns:
abs(x)

__add__(x, y)
(Addition operator)

Returns:
x+y

__and__(x, y)
(And operator)

Returns:
x&y

__cmp__(x, y)
(Comparison operator)

Returns:
cmp(x,y)

__coerce__(x, y)

Returns:
coerce(x, y)

__div__(x, y)

Returns:
x/y

__divmod__(x, y)

Returns:
xdivmod(x, y)y

__float__(x)

Returns:
float(x)

__floordiv__(x, y)

Returns:
x//y

__getattribute__(...)

x.__getattribute__('name') <==> x.name

__hash__(x)
(Hashing function)

Returns:
hash(x)

__hex__(x)

Returns:
hex(x)

__int__(x)

Returns:
int(x)

__invert__(x)

Returns:
~x

__long__(x)

Returns:
long(x)

__lshift__(x, y)

Returns:
x<<y

__mod__(x, y)

Returns:
x%y

__mul__(x, y)

Returns:
x*y

__neg__(x)

Returns:
-x

__nonzero__(x)
(Boolean test operator)

Returns:
x != 0

__oct__(x)

Returns:
oct(x)

__or__(x, y)
(Or operator)

Returns:
x|y

__pos__(x)

Returns:
+x

__pow__(x, y, z=...)

Returns:
pow(x, y[, z])

__radd__(x, y)
(Right-side addition operator)

Returns:
y+x

__rand__(x, y)

Returns:
y&x

__rdiv__(x, y)

Returns:
y/x

__rdivmod__(x, y)

Returns:
ydivmod(y, x)x

__repr__(x)
(Representation operator)

Returns:
repr(x)

__rfloordiv__(x, y)

Returns:
y//x

__rlshift__(x, y)

Returns:
y<<x

__rmod__(x, y)

Returns:
y%x

__rmul__(x, y)

Returns:
y*x

__ror__(x, y)

Returns:
y|x

__rpow__(y, x, z=...)

Returns:
pow(x, y[, z])

__rrshift__(x, y)

Returns:
y>>x

__rshift__(x, y)

Returns:
x>>y

__rsub__(x, y)

Returns:
y-x

__rtruediv__(x, y)

Returns:
y/x

__rxor__(x, y)

Returns:
y^x

__str__(x)
(Informal representation operator)

Returns:
str(x)

__sub__(x, y)
(Subtraction operator)

Returns:
x-y

__truediv__(x, y)

Returns:
x/y

__xor__(x, y)

Returns:
x^y

Generated by Epydoc 1.2 prerelease on Wed Jan 29 06:25:25 2003 http://epydoc.sf.net