bool :: Class bool
[hide private]
[frames] | no frames]

Class bool



object --+    
         |    
       int --+
             |
            bool

bool(x) -> bool

Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

Instance Methods [hide private]
  __and__(x, y)
x&y
  __new__(T, S, ...)
  __or__(x, y)
x|y
  __rand__(x, y)
y&x
  __repr__(x)
repr(x)
  __ror__(x, y)
y|x
  __rxor__(x, y)
y^x
  __str__(x)
str(x)
  __xor__(x, y)
x^y

Inherited from int: __abs__, __add__, __cmp__, __coerce__, __div__, __divmod__, __float__, __floordiv__, __getattribute__, __getnewargs__, __hash__, __hex__, __int__, __invert__, __long__, __lshift__, __mod__, __mul__, __neg__, __nonzero__, __oct__, __pos__, __pow__, __radd__, __rdiv__, __rdivmod__, __rfloordiv__, __rlshift__, __rmod__, __rmul__, __rpow__, __rrshift__, __rshift__, __rsub__, __rtruediv__, __sub__, __truediv__

Inherited from object: __delattr__, __init__, __reduce__, __reduce_ex__, __setattr__


Properties [hide private]

Inherited from object: __class__


Method Details [hide private]

__and__(x, y)
(And operator)

 
x&y
Overrides: int.__and__

__new__(T, S, ...)

 
Returns:
a new object with type S, a subtype of T

Overrides: int.__new__

__or__(x, y)
(Or operator)

 
x|y
Overrides: int.__or__

__rand__(x, y)

 
y&x
Overrides: int.__rand__

__repr__(x)
(Representation operator)

 
repr(x)
Overrides: int.__repr__

__ror__(x, y)

 
y|x
Overrides: int.__ror__

__rxor__(x, y)

 
y^x
Overrides: int.__rxor__

__str__(x)
(Informal representation operator)

 
str(x)
Overrides: int.__str__

__xor__(x, y)

 
x^y
Overrides: int.__xor__