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

Class float

object --+
         |
        float


float(x) -> floating point number

Convert a string or number to a floating point number, if possible.
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
  __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)
  __int__(x)
Return int(x)
  __long__(x)
Return long(x)
  __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
  __pos__(x)
Return +x
  __pow__(x, y, z)
Return pow(x, y[, z])
  __radd__(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
  __rmod__(x, y)
Return y%x
  __rmul__(x, y)
Return y*x
  __rpow__(y, x, z)
Return pow(x, y[, z])
  __rsub__(x, y)
Return y-x
  __rtruediv__(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

Method Details

__abs__(x)

Returns:
abs(x)

__add__(x, y)
(Addition 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)

__int__(x)

Returns:
int(x)

__long__(x)

Returns:
long(x)

__mod__(x, y)

Returns:
x%y

__mul__(x, y)

Returns:
x*y

__neg__(x)

Returns:
-x

__nonzero__(x)
(Boolean test operator)

Returns:
x != 0

__pos__(x)

Returns:
+x

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

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

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

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

__rmod__(x, y)

Returns:
y%x

__rmul__(x, y)

Returns:
y*x

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

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

__rsub__(x, y)

Returns:
y-x

__rtruediv__(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

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