;
Êâ"Ic               @   sÄ   d  Z  d d l m Z m Z m Z d d d d d g Z Gd „  d d	 e ƒZ Gd
 „  d e ƒ Z e j e	 ƒ Gd „  d e ƒ Z
 e
 j e ƒ Gd „  d e
 ƒ Z Gd „  d e ƒ Z e j e ƒ d S(   u~   Abstract Base Classes (ABCs) for numbers, according to PEP 3141.

TODO: Fill out more detailed documentation on the operators.i    (   u   ABCMetau   abstractmethodu   abstractpropertyu   Numberu   Complexu   Realu   Rationalu   Integralc             B   s   |  Ee  Z d  Z d Z d S(   uŸ   All numbers inherit from this class.

    If you just want to check if an argument x is a number, without
    caring what kind, use isinstance(x, Number).
    N(   u   __name__u
   __module__u   __doc__u   Noneu   __hash__(   u
   __locals__(    (    u$   /mit/python/lib/python3.0/numbers.pyu   Number   s   
u	   metaclassc             B   s(  |  Ee  Z d  Z e d „  ƒ Z d „  Z e d „  ƒ Z e d „  ƒ Z e d „  ƒ Z	 e d „  ƒ Z
 e d „  ƒ Z e d „  ƒ Z d	 „  Z d
 „  Z e d „  ƒ Z e d „  ƒ Z e d „  ƒ Z e d „  ƒ Z e d „  ƒ Z e d „  ƒ Z e d „  ƒ Z e d „  ƒ Z e d „  ƒ Z d „  Z d S(   ua  Complex defines the operations that work on the builtin complex type.

    In short, those are: a conversion to complex, .real, .imag, +, -,
    *, /, abs(), .conjugate, ==, and !=.

    If it is given heterogenous arguments, and doesn't have special
    knowledge about them, it should fall back to the builtin complex
    type as described below.
    c             C   s   d S(   u<   Return a builtin complex instance. Called for complex(self).N(    (   u   self(    (    u$   /mit/python/lib/python3.0/numbers.pyu   __complex__)   s    c             C   s
   |  d k S(   u)   True if self != 0. Called for bool(self).i    (    (   u   self(    (    u$   /mit/python/lib/python3.0/numbers.pyu   __bool__-   s    c             C   s
   t  ‚ d S(   uX   Retrieve the real component of this number.

        This should subclass Real.
        N(   u   NotImplementedError(   u   self(    (    u$   /mit/python/lib/python3.0/numbers.pyu   real1   s    c             C   s
   t  ‚ d S(   uX   Retrieve the real component of this number.

        This should subclass Real.
        N(   u   NotImplementedError(   u   self(    (    u$   /mit/python/lib/python3.0/numbers.pyu   imag9   s    c             C   s
   t  ‚ d S(   u   self + otherN(   u   NotImplementedError(   u   selfu   other(    (    u$   /mit/python/lib/python3.0/numbers.pyu   __add__A   s    c             C   s
   t  ‚ d S(   u   other + selfN(   u   NotImplementedError(   u   selfu   other(    (    u$   /mit/python/lib/python3.0/numbers.pyu   __radd__F   s    c             C   s
   t  ‚ d S(   u   -selfN(   u   NotImplementedError(   u   self(    (    u$   /mit/python/lib/python3.0/numbers.pyu   __neg__K   s    c             C   s
   t  ‚ d S(   u   +selfN(   u   NotImplementedError(   u   self(    (    u$   /mit/python/lib/python3.0/numbers.pyu   __pos__P   s    c             C   s	   |  | S(   u   self - other(    (   u   selfu   other(    (    u$   /mit/python/lib/python3.0/numbers.pyu   __sub__U   s    c             C   s	   |  | S(   u   other - self(    (   u   selfu   other(    (    u$   /mit/python/lib/python3.0/numbers.pyu   __rsub__Y   s    c             C   s
   t  ‚ d S(   u   self * otherN(   u   NotImplementedError(   u   selfu   other(    (    u$   /mit/python/lib/python3.0/numbers.pyu   __mul__]   s    c             C   s
   t  ‚ d S(   u   other * selfN(   u   NotImplementedError(   u   selfu   other(    (    u$   /mit/python/lib/python3.0/numbers.pyu   __rmul__b   s    c             C   s
   t  ‚ d S(   u5   self / other: Should promote to float when necessary.N(   u   NotImplementedError(   u   selfu   other(    (    u$   /mit/python/lib/python3.0/numbers.pyu   __truediv__g   s    c             C   s
   t  ‚ d S(   u   other / selfN(   u   NotImplementedError(   u   selfu   other(    (    u$   /mit/python/lib/python3.0/numbers.pyu   __rtruediv__l   s    c             C   s
   t  ‚ d S(   uB   self**exponent; should promote to float or complex when necessary.N(   u   NotImplementedError(   u   selfu   exponent(    (    u$   /mit/python/lib/python3.0/numbers.pyu   __pow__q   s    c             C   s
   t  ‚ d S(   u   base ** selfN(   u   NotImplementedError(   u   selfu   base(    (    u$   /mit/python/lib/python3.0/numbers.pyu   __rpow__v   s    c             C   s
   t  ‚ d S(   u7   Returns the Real distance from 0. Called for abs(self).N(   u   NotImplementedError(   u   self(    (    u$   /mit/python/lib/python3.0/numbers.pyu   __abs__{   s    c             C   s
   t  ‚ d S(   u$   (x+y*i).conjugate() returns (x-y*i).N(   u   NotImplementedError(   u   self(    (    u$   /mit/python/lib/python3.0/numbers.pyu	   conjugate€   s    c             C   s
   t  ‚ d S(   u   self == otherN(   u   NotImplementedError(   u   selfu   other(    (    u$   /mit/python/lib/python3.0/numbers.pyu   __eq__…   s    c             C   s   |  | k S(   u   self != other(    (   u   selfu   other(    (    u$   /mit/python/lib/python3.0/numbers.pyu   __ne__Š   s    N(   u   __name__u
   __module__u   __doc__u   abstractmethodu   __complex__u   __bool__u   abstractpropertyu   realu   imagu   __add__u   __radd__u   __neg__u   __pos__u   __sub__u   __rsub__u   __mul__u   __rmul__u   __truediv__u   __rtruediv__u   __pow__u   __rpow__u   __abs__u	   conjugateu   __eq__u   __ne__(   u
   __locals__(    (    u$   /mit/python/lib/python3.0/numbers.pyu   Complex   s*   
				c             B   s  |  Ee  Z d  Z e d „  ƒ Z e d „  ƒ Z e d „  ƒ Z e d „  ƒ Z e d d d d  „ ƒ Z	 d „  Z
 d	 „  Z e d
 „  ƒ Z e d „  ƒ Z e d „  ƒ Z e d „  ƒ Z e d „  ƒ Z e d „  ƒ Z d „  Z e d „  ƒ Z e d „  ƒ Z d „  Z d S(   uÜ   To Complex, Real adds the operations that work on real numbers.

    In short, those are: a conversion to float, trunc(), divmod,
    %, <, <=, >, and >=.

    Real also provides defaults for the derived operations.
    c             C   s
   t  ‚ d S(   uT   Any Real can be converted to a native float object.

        Called for float(self).N(   u   NotImplementedError(   u   self(    (    u$   /mit/python/lib/python3.0/numbers.pyu	   __float__›   s    c             C   s
   t  ‚ d S(   uG  trunc(self): Truncates self to an Integral.

        Returns an Integral i such that:
          * i>0 iff self>0;
          * abs(i) <= abs(self);
          * for any Integral j satisfying the first two conditions,
            abs(i) >= abs(j) [i.e. i has "maximal" abs among those].
        i.e. "truncate towards 0".
        N(   u   NotImplementedError(   u   self(    (    u$   /mit/python/lib/python3.0/numbers.pyu	   __trunc__¢   s    c             C   s
   t  ‚ d S(   u$   Finds the greatest Integral <= self.N(   u   NotImplementedError(   u   self(    (    u$   /mit/python/lib/python3.0/numbers.pyu	   __floor__¯   s    c             C   s
   t  ‚ d S(   u!   Finds the least Integral >= self.N(   u   NotImplementedError(   u   self(    (    u$   /mit/python/lib/python3.0/numbers.pyu   __ceil__´   s    u   Integral(   u   ndigitsc             C   s
   t  ‚ d S(   u¸   Rounds self to ndigits decimal places, defaulting to 0.

        If ndigits is omitted or None, returns an Integral, otherwise
        returns a Real. Rounds half toward even.
        N(   u   NotImplementedError(   u   selfu   ndigits(    (    u$   /mit/python/lib/python3.0/numbers.pyu	   __round__¹   s    c             C   s   |  | |  | f S(   u™   divmod(self, other): The pair (self // other, self % other).

        Sometimes this can be computed faster than the pair of
        operations.
        (    (   u   selfu   other(    (    u$   /mit/python/lib/python3.0/numbers.pyu
   __divmod__Â   s    c             C   s   | |  | |  f S(   u™   divmod(other, self): The pair (self // other, self % other).

        Sometimes this can be computed faster than the pair of
        operations.
        (    (   u   selfu   other(    (    u$   /mit/python/lib/python3.0/numbers.pyu   __rdivmod__Ê   s    c             C   s
   t  ‚ d S(   u)   self // other: The floor() of self/other.N(   u   NotImplementedError(   u   selfu   other(    (    u$   /mit/python/lib/python3.0/numbers.pyu   __floordiv__Ò   s    c             C   s
   t  ‚ d S(   u)   other // self: The floor() of other/self.N(   u   NotImplementedError(   u   selfu   other(    (    u$   /mit/python/lib/python3.0/numbers.pyu   __rfloordiv__×   s    c             C   s
   t  ‚ d S(   u   self % otherN(   u   NotImplementedError(   u   selfu   other(    (    u$   /mit/python/lib/python3.0/numbers.pyu   __mod__Ü   s    c             C   s
   t  ‚ d S(   u   other % selfN(   u   NotImplementedError(   u   selfu   other(    (    u$   /mit/python/lib/python3.0/numbers.pyu   __rmod__á   s    c             C   s
   t  ‚ d S(   uR   self < other

        < on Reals defines a total ordering, except perhaps for NaN.N(   u   NotImplementedError(   u   selfu   other(    (    u$   /mit/python/lib/python3.0/numbers.pyu   __lt__æ   s    c             C   s
   t  ‚ d S(   u   self <= otherN(   u   NotImplementedError(   u   selfu   other(    (    u$   /mit/python/lib/python3.0/numbers.pyu   __le__í   s    c             C   s   t  t |  ƒ ƒ S(   u(   complex(self) == complex(float(self), 0)(   u   complexu   float(   u   self(    (    u$   /mit/python/lib/python3.0/numbers.pyu   __complex__ó   s    c             C   s   |  
S(   u&   Real numbers are their real component.(    (   u   self(    (    u$   /mit/python/lib/python3.0/numbers.pyu   real÷   s    c             C   s   d S(   u)   Real numbers have no imaginary component.i    (    (   u   self(    (    u$   /mit/python/lib/python3.0/numbers.pyu   imagü   s    c             C   s   |  
S(   u   Conjugate is a no-op for Reals.(    (   u   self(    (    u$   /mit/python/lib/python3.0/numbers.pyu	   conjugate  s    N(   u   __name__u
   __module__u   __doc__u   abstractmethodu	   __float__u	   __trunc__u	   __floor__u   __ceil__u   Noneu	   __round__u
   __divmod__u   __rdivmod__u   __floordiv__u   __rfloordiv__u   __mod__u   __rmod__u   __lt__u   __le__u   __complex__u   propertyu   realu   imagu	   conjugate(   u
   __locals__(    (    u$   /mit/python/lib/python3.0/numbers.pyu   Real’   s&   
			c             B   s;   |  Ee  Z d  Z e d „  ƒ Z e d „  ƒ Z d „  Z d S(   u6   .numerator and .denominator should be in lowest terms.c             C   s
   t  ‚ d  S(   N(   u   NotImplementedError(   u   self(    (    u$   /mit/python/lib/python3.0/numbers.pyu	   numerator  s    c             C   s
   t  ‚ d  S(   N(   u   NotImplementedError(   u   self(    (    u$   /mit/python/lib/python3.0/numbers.pyu   denominator  s    c             C   s   |  j  |  j S(   u  float(self) = self.numerator / self.denominator

        It's important that this conversion use the integer's "true"
        division rather than casting one side to float before dividing
        so that ratios of huge integers convert without overflowing.

        (   u	   numeratoru   denominator(   u   self(    (    u$   /mit/python/lib/python3.0/numbers.pyu	   __float__  s    N(   u   __name__u
   __module__u   __doc__u   abstractpropertyu	   numeratoru   denominatoru	   __float__(   u
   __locals__(    (    u$   /mit/python/lib/python3.0/numbers.pyu   Rational  s   
c             B   s
  |  Ee  Z d  Z e d „  ƒ Z d „  Z e d d „ ƒ Z e d „  ƒ Z e d „  ƒ Z	 e d „  ƒ Z
 e d „  ƒ Z e d „  ƒ Z e d	 „  ƒ Z e d
 „  ƒ Z e d „  ƒ Z e d „  ƒ Z e d „  ƒ Z e d „  ƒ Z d „  Z e d „  ƒ Z e d „  ƒ Z d S(   u@   Integral adds a conversion to int and the bit-string operations.c             C   s
   t  ‚ d S(   u	   int(self)N(   u   NotImplementedError(   u   self(    (    u$   /mit/python/lib/python3.0/numbers.pyu   __int__"  s    c             C   s
   t  |  ƒ S(   u   index(self)(   u   int(   u   self(    (    u$   /mit/python/lib/python3.0/numbers.pyu	   __index__'  s    c             C   s
   t  ‚ d S(   u4  self ** exponent % modulus, but maybe faster.

        Accept the modulus argument if you want to support the
        3-argument version of pow(). Raise a TypeError if exponent < 0
        or any argument isn't Integral. Otherwise, just implement the
        2-argument version described in Complex.
        N(   u   NotImplementedError(   u   selfu   exponentu   modulus(    (    u$   /mit/python/lib/python3.0/numbers.pyu   __pow__+  s    	c             C   s
   t  ‚ d S(   u   self << otherN(   u   NotImplementedError(   u   selfu   other(    (    u$   /mit/python/lib/python3.0/numbers.pyu
   __lshift__6  s    c             C   s
   t  ‚ d S(   u   other << selfN(   u   NotImplementedError(   u   selfu   other(    (    u$   /mit/python/lib/python3.0/numbers.pyu   __rlshift__;  s    c             C   s
   t  ‚ d S(   u   self >> otherN(   u   NotImplementedError(   u   selfu   other(    (    u$   /mit/python/lib/python3.0/numbers.pyu
   __rshift__@  s    c             C   s
   t  ‚ d S(   u   other >> selfN(   u   NotImplementedError(   u   selfu   other(    (    u$   /mit/python/lib/python3.0/numbers.pyu   __rrshift__E  s    c             C   s
   t  ‚ d S(   u   self & otherN(   u   NotImplementedError(   u   selfu   other(    (    u$   /mit/python/lib/python3.0/numbers.pyu   __and__J  s    c             C   s
   t  ‚ d S(   u   other & selfN(   u   NotImplementedError(   u   selfu   other(    (    u$   /mit/python/lib/python3.0/numbers.pyu   __rand__O  s    c             C   s
   t  ‚ d S(   u   self ^ otherN(   u   NotImplementedError(   u   selfu   other(    (    u$   /mit/python/lib/python3.0/numbers.pyu   __xor__T  s    c             C   s
   t  ‚ d S(   u   other ^ selfN(   u   NotImplementedError(   u   selfu   other(    (    u$   /mit/python/lib/python3.0/numbers.pyu   __rxor__Y  s    c             C   s
   t  ‚ d S(   u   self | otherN(   u   NotImplementedError(   u   selfu   other(    (    u$   /mit/python/lib/python3.0/numbers.pyu   __or__^  s    c             C   s
   t  ‚ d S(   u   other | selfN(   u   NotImplementedError(   u   selfu   other(    (    u$   /mit/python/lib/python3.0/numbers.pyu   __ror__c  s    c             C   s
   t  ‚ d S(   u   ~selfN(   u   NotImplementedError(   u   self(    (    u$   /mit/python/lib/python3.0/numbers.pyu
   __invert__h  s    c             C   s   t  t |  ƒ ƒ S(   u   float(self) == float(int(self))(   u   floatu   int(   u   self(    (    u$   /mit/python/lib/python3.0/numbers.pyu	   __float__n  s    c             C   s   |  
S(   u"   Integers are their own numerators.(    (   u   self(    (    u$   /mit/python/lib/python3.0/numbers.pyu	   numeratorr  s    c             C   s   d S(   u!   Integers have a denominator of 1.i   (    (   u   self(    (    u$   /mit/python/lib/python3.0/numbers.pyu   denominatorw  s    N(   u   __name__u
   __module__u   __doc__u   abstractmethodu   __int__u	   __index__u   Noneu   __pow__u
   __lshift__u   __rlshift__u
   __rshift__u   __rrshift__u   __and__u   __rand__u   __xor__u   __rxor__u   __or__u   __ror__u
   __invert__u	   __float__u   propertyu	   numeratoru   denominator(   u
   __locals__(    (    u$   /mit/python/lib/python3.0/numbers.pyu   Integral  s&   
	
	N(   u   __doc__u   abcu   ABCMetau   abstractmethodu   abstractpropertyu   __all__u   Numberu   Complexu   registeru   complexu   Realu   floatu   Rationalu   Integralu   int(    (    (    u$   /mit/python/lib/python3.0/numbers.pyu   <module>   s   qs]