Your IP : 3.15.3.17


Current Path : /opt/alt/python33/lib64/python3.3/__pycache__/
Upload File :
Current File : //opt/alt/python33/lib64/python3.3/__pycache__/numbers.cpython-33.pyo

�
��f�(c@s�dZddlmZmZdddddgZGdd�dd	e�ZGd
d�de�Zeje�Gdd�de�Z	e	je
�Gdd�de	�ZGd
d�de�Zeje
�dS(u~Abstract Base Classes (ABCs) for numbers, according to PEP 3141.

TODO: Fill out more detailed documentation on the operators.i(uABCMetauabstractmethoduNumberuComplexuRealuRationaluIntegralcBs&|EeZdZdZfZdZdS(uNumberu�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__qualname__u__doc__u	__slots__uNoneu__hash__(u
__locals__((u,/opt/alt/python33/lib64/python3.3/numbers.pyuNumbersu	metaclasscBs||EeZdZdZfZedd��Zdd�Zeedd���Z	eedd	���Z
ed
d��Zedd
��Zedd��Z
edd��Zdd�Zdd�Zedd��Zedd��Zedd��Zedd��Zedd��Zed d!��Zed"d#��Zed$d%��Zed&d'��Zd(d)�Zd*S(+uComplexuaComplex 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.
    cCsdS(u<Return a builtin complex instance. Called for complex(self).N((uself((u,/opt/alt/python33/lib64/python3.3/numbers.pyu__complex__-suComplex.__complex__cCs
|dkS(u)True if self != 0. Called for bool(self).i((uself((u,/opt/alt/python33/lib64/python3.3/numbers.pyu__bool__1suComplex.__bool__cCs
t�dS(uXRetrieve the real component of this number.

        This should subclass Real.
        N(uNotImplementedError(uself((u,/opt/alt/python33/lib64/python3.3/numbers.pyureal5suComplex.realcCs
t�dS(u]Retrieve the imaginary component of this number.

        This should subclass Real.
        N(uNotImplementedError(uself((u,/opt/alt/python33/lib64/python3.3/numbers.pyuimag>suComplex.imagcCs
t�dS(uself + otherN(uNotImplementedError(uselfuother((u,/opt/alt/python33/lib64/python3.3/numbers.pyu__add__GsuComplex.__add__cCs
t�dS(uother + selfN(uNotImplementedError(uselfuother((u,/opt/alt/python33/lib64/python3.3/numbers.pyu__radd__LsuComplex.__radd__cCs
t�dS(u-selfN(uNotImplementedError(uself((u,/opt/alt/python33/lib64/python3.3/numbers.pyu__neg__QsuComplex.__neg__cCs
t�dS(u+selfN(uNotImplementedError(uself((u,/opt/alt/python33/lib64/python3.3/numbers.pyu__pos__VsuComplex.__pos__cCs	||S(uself - other((uselfuother((u,/opt/alt/python33/lib64/python3.3/numbers.pyu__sub__[suComplex.__sub__cCs	||S(uother - self((uselfuother((u,/opt/alt/python33/lib64/python3.3/numbers.pyu__rsub___suComplex.__rsub__cCs
t�dS(uself * otherN(uNotImplementedError(uselfuother((u,/opt/alt/python33/lib64/python3.3/numbers.pyu__mul__csuComplex.__mul__cCs
t�dS(uother * selfN(uNotImplementedError(uselfuother((u,/opt/alt/python33/lib64/python3.3/numbers.pyu__rmul__hsuComplex.__rmul__cCs
t�dS(u5self / other: Should promote to float when necessary.N(uNotImplementedError(uselfuother((u,/opt/alt/python33/lib64/python3.3/numbers.pyu__truediv__msuComplex.__truediv__cCs
t�dS(uother / selfN(uNotImplementedError(uselfuother((u,/opt/alt/python33/lib64/python3.3/numbers.pyu__rtruediv__rsuComplex.__rtruediv__cCs
t�dS(uBself**exponent; should promote to float or complex when necessary.N(uNotImplementedError(uselfuexponent((u,/opt/alt/python33/lib64/python3.3/numbers.pyu__pow__wsuComplex.__pow__cCs
t�dS(ubase ** selfN(uNotImplementedError(uselfubase((u,/opt/alt/python33/lib64/python3.3/numbers.pyu__rpow__|suComplex.__rpow__cCs
t�dS(u7Returns the Real distance from 0. Called for abs(self).N(uNotImplementedError(uself((u,/opt/alt/python33/lib64/python3.3/numbers.pyu__abs__�suComplex.__abs__cCs
t�dS(u$(x+y*i).conjugate() returns (x-y*i).N(uNotImplementedError(uself((u,/opt/alt/python33/lib64/python3.3/numbers.pyu	conjugate�suComplex.conjugatecCs
t�dS(u
self == otherN(uNotImplementedError(uselfuother((u,/opt/alt/python33/lib64/python3.3/numbers.pyu__eq__�suComplex.__eq__cCs||kS(u
self != other((uselfuother((u,/opt/alt/python33/lib64/python3.3/numbers.pyu__ne__�suComplex.__ne__N(u__name__u
__module__u__qualname__u__doc__u	__slots__uabstractmethodu__complex__u__bool__upropertyurealuimagu__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,/opt/alt/python33/lib64/python3.3/numbers.pyuComplex s0	cBs=|EeZdZdZfZedd��Zedd��Zedd��Zedd	��Z	ed$d
d��Zdd
�Zdd�Z
edd��Zedd��Zedd��Zedd��Zedd��Zedd��Zdd�Zedd��Zed d!��Zd"d#�Zd$S(%uRealu�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.
    cCs
t�dS(uTAny Real can be converted to a native float object.

        Called for float(self).N(uNotImplementedError(uself((u,/opt/alt/python33/lib64/python3.3/numbers.pyu	__float__�suReal.__float__cCs
t�dS(uGtrunc(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(uNotImplementedError(uself((u,/opt/alt/python33/lib64/python3.3/numbers.pyu	__trunc__�suReal.__trunc__cCs
t�dS(u$Finds the greatest Integral <= self.N(uNotImplementedError(uself((u,/opt/alt/python33/lib64/python3.3/numbers.pyu	__floor__�suReal.__floor__cCs
t�dS(u!Finds the least Integral >= self.N(uNotImplementedError(uself((u,/opt/alt/python33/lib64/python3.3/numbers.pyu__ceil__�su
Real.__ceil__cCs
t�dS(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(uNotImplementedError(uselfundigits((u,/opt/alt/python33/lib64/python3.3/numbers.pyu	__round__�suReal.__round__cCs||||fS(u�divmod(self, other): The pair (self // other, self % other).

        Sometimes this can be computed faster than the pair of
        operations.
        ((uselfuother((u,/opt/alt/python33/lib64/python3.3/numbers.pyu
__divmod__�suReal.__divmod__cCs||||fS(u�divmod(other, self): The pair (self // other, self % other).

        Sometimes this can be computed faster than the pair of
        operations.
        ((uselfuother((u,/opt/alt/python33/lib64/python3.3/numbers.pyu__rdivmod__�suReal.__rdivmod__cCs
t�dS(u)self // other: The floor() of self/other.N(uNotImplementedError(uselfuother((u,/opt/alt/python33/lib64/python3.3/numbers.pyu__floordiv__�suReal.__floordiv__cCs
t�dS(u)other // self: The floor() of other/self.N(uNotImplementedError(uselfuother((u,/opt/alt/python33/lib64/python3.3/numbers.pyu
__rfloordiv__�suReal.__rfloordiv__cCs
t�dS(uself % otherN(uNotImplementedError(uselfuother((u,/opt/alt/python33/lib64/python3.3/numbers.pyu__mod__�suReal.__mod__cCs
t�dS(uother % selfN(uNotImplementedError(uselfuother((u,/opt/alt/python33/lib64/python3.3/numbers.pyu__rmod__�su
Real.__rmod__cCs
t�dS(uRself < other

        < on Reals defines a total ordering, except perhaps for NaN.N(uNotImplementedError(uselfuother((u,/opt/alt/python33/lib64/python3.3/numbers.pyu__lt__�suReal.__lt__cCs
t�dS(u
self <= otherN(uNotImplementedError(uselfuother((u,/opt/alt/python33/lib64/python3.3/numbers.pyu__le__�suReal.__le__cCstt|��S(u(complex(self) == complex(float(self), 0)(ucomplexufloat(uself((u,/opt/alt/python33/lib64/python3.3/numbers.pyu__complex__�suReal.__complex__cCs|
S(u&Real numbers are their real component.((uself((u,/opt/alt/python33/lib64/python3.3/numbers.pyureal�su	Real.realcCsdS(u)Real numbers have no imaginary component.i((uself((u,/opt/alt/python33/lib64/python3.3/numbers.pyuimagsu	Real.imagcCs|
S(uConjugate is a no-op for Reals.((uself((u,/opt/alt/python33/lib64/python3.3/numbers.pyu	conjugate	suReal.conjugateN(u__name__u
__module__u__qualname__u__doc__u	__slots__uabstractmethodu	__float__u	__trunc__u	__floor__u__ceil__uNoneu	__round__u
__divmod__u__rdivmod__u__floordiv__u
__rfloordiv__u__mod__u__rmod__u__lt__u__le__u__complex__upropertyurealuimagu	conjugate(u
__locals__((u,/opt/alt/python33/lib64/python3.3/numbers.pyuReal�s(
cBs\|EeZdZdZfZeedd���Zeedd���Zdd�Z	dS(	uRationalu6.numerator and .denominator should be in lowest terms.cCs
t�dS(N(uNotImplementedError(uself((u,/opt/alt/python33/lib64/python3.3/numbers.pyu	numeratorsuRational.numeratorcCs
t�dS(N(uNotImplementedError(uself((u,/opt/alt/python33/lib64/python3.3/numbers.pyudenominatorsuRational.denominatorcCs|j|jS(ufloat(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	numeratorudenominator(uself((u,/opt/alt/python33/lib64/python3.3/numbers.pyu	__float__ suRational.__float__N(
u__name__u
__module__u__qualname__u__doc__u	__slots__upropertyuabstractmethodu	numeratorudenominatoru	__float__(u
__locals__((u,/opt/alt/python33/lib64/python3.3/numbers.pyuRationalscBsI|EeZdZdZfZedd��Zdd�Zed$dd��Z	edd	��Z
ed
d��Zedd
��Zedd��Z
edd��Zedd��Zedd��Zedd��Zedd��Zedd��Zedd��Zdd�Zed d!��Zed"d#��Zd$S(%uIntegralu@Integral adds a conversion to int and the bit-string operations.cCs
t�dS(u	int(self)N(uNotImplementedError(uself((u,/opt/alt/python33/lib64/python3.3/numbers.pyu__int__0suIntegral.__int__cCs
t|�S(u6Called whenever an index is needed, such as in slicing(uint(uself((u,/opt/alt/python33/lib64/python3.3/numbers.pyu	__index__5suIntegral.__index__cCs
t�dS(u4self ** 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(uNotImplementedError(uselfuexponentumodulus((u,/opt/alt/python33/lib64/python3.3/numbers.pyu__pow__9s	uIntegral.__pow__cCs
t�dS(u
self << otherN(uNotImplementedError(uselfuother((u,/opt/alt/python33/lib64/python3.3/numbers.pyu
__lshift__DsuIntegral.__lshift__cCs
t�dS(u
other << selfN(uNotImplementedError(uselfuother((u,/opt/alt/python33/lib64/python3.3/numbers.pyu__rlshift__IsuIntegral.__rlshift__cCs
t�dS(u
self >> otherN(uNotImplementedError(uselfuother((u,/opt/alt/python33/lib64/python3.3/numbers.pyu
__rshift__NsuIntegral.__rshift__cCs
t�dS(u
other >> selfN(uNotImplementedError(uselfuother((u,/opt/alt/python33/lib64/python3.3/numbers.pyu__rrshift__SsuIntegral.__rrshift__cCs
t�dS(uself & otherN(uNotImplementedError(uselfuother((u,/opt/alt/python33/lib64/python3.3/numbers.pyu__and__XsuIntegral.__and__cCs
t�dS(uother & selfN(uNotImplementedError(uselfuother((u,/opt/alt/python33/lib64/python3.3/numbers.pyu__rand__]suIntegral.__rand__cCs
t�dS(uself ^ otherN(uNotImplementedError(uselfuother((u,/opt/alt/python33/lib64/python3.3/numbers.pyu__xor__bsuIntegral.__xor__cCs
t�dS(uother ^ selfN(uNotImplementedError(uselfuother((u,/opt/alt/python33/lib64/python3.3/numbers.pyu__rxor__gsuIntegral.__rxor__cCs
t�dS(uself | otherN(uNotImplementedError(uselfuother((u,/opt/alt/python33/lib64/python3.3/numbers.pyu__or__lsuIntegral.__or__cCs
t�dS(uother | selfN(uNotImplementedError(uselfuother((u,/opt/alt/python33/lib64/python3.3/numbers.pyu__ror__qsuIntegral.__ror__cCs
t�dS(u~selfN(uNotImplementedError(uself((u,/opt/alt/python33/lib64/python3.3/numbers.pyu
__invert__vsuIntegral.__invert__cCstt|��S(ufloat(self) == float(int(self))(ufloatuint(uself((u,/opt/alt/python33/lib64/python3.3/numbers.pyu	__float__|suIntegral.__float__cCs|
S(u"Integers are their own numerators.((uself((u,/opt/alt/python33/lib64/python3.3/numbers.pyu	numerator�suIntegral.numeratorcCsdS(u!Integers have a denominator of 1.i((uself((u,/opt/alt/python33/lib64/python3.3/numbers.pyudenominator�suIntegral.denominatorN(u__name__u
__module__u__qualname__u__doc__u	__slots__uabstractmethodu__int__u	__index__uNoneu__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__upropertyu	numeratorudenominator(u
__locals__((u,/opt/alt/python33/lib64/python3.3/numbers.pyuIntegral+s(
N(u__doc__uabcuABCMetauabstractmethodu__all__uNumberuComplexuregisterucomplexuRealufloatuRationaluIntegraluint(((u,/opt/alt/python33/lib64/python3.3/numbers.pyu<module>su
u
_

?>