float :: Class float

[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.

Instance Methods | [hide private]

`` | __abs__(x) abs(x)
`` | __add__(x, y) x+y
`` | __cmp__(x, y) cmp(x,y)
`` | __coerce__(x, y) coerce(x, y)
`` | __div__(x, y) x/y
`` | __divmod__(x, y) xdivmod(x, y)y
`` | __float__(x) float(x)
`` | __floordiv__(x, y) x//y
`` | __getattribute__(...) x.__getattribute__('name') <==> x.name
`` | __getnewargs__(...)
`` | __hash__(x) hash(x)
`` | __int__(x) int(x)
`` | __long__(x) long(x)
`` | __mod__(x, y) x%y
`` | __mul__(x, y) x*y
`` | __neg__(x) -x
`` | __new__(T, S, ...)
`` | __nonzero__(x) x != 0
`` | __pos__(x) +x
`` | __pow__(x, y, z=...) pow(x, y[, z])
`` | __radd__(x, y) y+x
`` | __rdiv__(x, y) y/x
`` | __rdivmod__(x, y) ydivmod(y, x)x
`` | __repr__(x) repr(x)
`` | __rfloordiv__(x, y) y//x
`` | __rmod__(x, y) y%x
`` | __rmul__(x, y) y*x
`` | __rpow__(y, x, z=...) pow(x, y[, z])
`` | __rsub__(x, y) y-x
`` | __rtruediv__(x, y) y/x
`` | __str__(x) str(x)
`` | __sub__(x, y) x-y
`` | __truediv__(x, y) x/y
Inherited from `object`: `__delattr__`, `__init__`, `__reduce__`, `__reduce_ex__`, `__setattr__`

Properties | [hide private]

Inherited from `object`: `__class__`

Method Details | [hide private]

### __abs__(x)

abs(x)

### __add__(x, y)
(Addition operator)

x+y

### __cmp__(x, y)
(Comparison operator)

cmp(x,y)

### __coerce__(x, y)

coerce(x, y)

### __div__(x, y)

x/y

### __divmod__(x, y)

xdivmod(x, y)y

### __float__(x)

float(x)

### __floordiv__(x, y)

x//y

### __getattribute__(...)

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

  Overrides: object.__getattribute__

### __getnewargs__(...)

None

### __hash__(x)
(Hashing function)

hash(x)

  Overrides: object.__hash__

### __int__(x)

int(x)

### __long__(x)

long(x)

### __mod__(x, y)

x%y

### __mul__(x, y)

x*y

### __neg__(x)

-x

### __new__(T, S, ...)

  Returns:

        a new object with type S, a subtype of T

  Overrides: object.__new__

### __nonzero__(x)
(Boolean test operator)

x != 0

### __pos__(x)

+x

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

pow(x, y[, z])

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

y+x

### __rdiv__(x, y)

y/x

### __rdivmod__(x, y)

ydivmod(y, x)x

### __repr__(x)
(Representation operator)

repr(x)

  Overrides: object.__repr__

### __rfloordiv__(x, y)

y//x

### __rmod__(x, y)

y%x

### __rmul__(x, y)

y*x

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

pow(x, y[, z])

### __rsub__(x, y)

y-x

### __rtruediv__(x, y)

y/x

### __str__(x)
(Informal representation operator)

str(x)

  Overrides: object.__str__

### __sub__(x, y)
(Subtraction operator)

x-y

### __truediv__(x, y)

x/y