<s> """<STR_LIT>""" <EOL> from __future__ import division <EOL> from abc import ABCMeta , abstractmethod , abstractproperty <EOL> __all__ = [ "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ] <EOL> class Number ( object ) : <EOL> """<STR_LIT>""" <EOL> __metaclass__ = ABCMeta <EOL> __hash__ = None <EOL> class Complex ( Number ) : <EOL> """<STR_LIT>""" <EOL> @ abstractmethod <EOL> def __complex__ ( self ) : <EOL> """<STR_LIT>""" <EOL> def __nonzero__ ( self ) : <EOL> """<STR_LIT>""" <EOL> return self != <NUM_LIT:0> <EOL> @ abstractproperty <EOL> def real ( self ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError <EOL> @ abstractproperty <EOL> def imag ( self ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError <EOL> @ abstractmethod <EOL> def __add__ ( self , other ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError <EOL> @ abstractmethod <EOL> def __radd__ ( self , other ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError <EOL> @ abstractmethod <EOL> def __neg__ ( self ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError <EOL> @ abstractmethod <EOL> def __pos__ ( self ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError <EOL> def __sub__ ( self , other ) : <EOL> """<STR_LIT>""" <EOL> return self + - other <EOL> def __rsub__ ( self , other ) : <EOL> """<STR_LIT>""" <EOL> return - self + other <EOL> @ abstractmethod <EOL> def __mul__ ( self , other ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError <EOL> @ abstractmethod <EOL> def __rmul__ ( self , other ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError <EOL> @ abstractmethod <EOL> def __div__ ( self , other ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError <EOL> @ abstractmethod <EOL> def __rdiv__ ( self , other ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError <EOL> @ abstractmethod <EOL> def __truediv__ ( self , other ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError <EOL> @ abstractmethod <EOL> def __rtruediv__ ( self , other ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError <EOL> @ abstractmethod <EOL> def __pow__ ( self , exponent ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError <EOL> @ abstractmethod <EOL> def __rpow__ ( self , base ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError <EOL> @ abstractmethod <EOL> def __abs__ ( self ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError <EOL> @ abstractmethod <EOL> def conjugate ( self ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError <EOL> @ abstractmethod <EOL> def __eq__ ( self , other ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError <EOL> def __ne__ ( self , other ) : <EOL> """<STR_LIT>""" <EOL> return not ( self == other ) <EOL> Complex . register ( complex ) <EOL> class Real ( Complex ) : <EOL> """<STR_LIT>""" <EOL> @ abstractmethod <EOL> def __float__ ( self ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError <EOL> @ abstractmethod <EOL> def __trunc__ ( self ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError <EOL> def __divmod__ ( self , other ) : <EOL> """<STR_LIT>""" <EOL> return ( self // other , self % other ) <EOL> def __rdivmod__ ( self , other ) : <EOL> """<STR_LIT>""" <EOL> return ( other // self , other % self ) <EOL> @ abstractmethod <EOL> def __floordiv__ ( self , other ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError <EOL> @ abstractmethod <EOL> def __rfloordiv__ ( self , other ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError <EOL> @ abstractmethod <EOL> def __mod__ ( self , other ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError <EOL> @ abstractmethod <EOL> def __rmod__ ( self , other ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError <EOL> @ abstractmethod <EOL> def __lt__ ( self , other ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError <EOL> @ abstractmethod <EOL> def __le__ ( self , other ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError <EOL> def __complex__ ( self ) : <EOL> """<STR_LIT>""" <EOL> return complex ( float ( self ) ) <EOL> @ property <EOL> def real ( self ) : <EOL> """<STR_LIT>""" <EOL> return + self <EOL> @ property <EOL> def imag ( self ) : <EOL> """<STR_LIT>""" <EOL> return <NUM_LIT:0> <EOL> def conjugate ( self ) : <EOL> """<STR_LIT>""" <EOL> return + self <EOL> Real . register ( float ) <EOL> class Rational ( Real ) : <EOL> """<STR_LIT>""" <EOL> @ abstractproperty <EOL> def numerator ( self ) : <EOL> raise NotImplementedError <EOL> @ abstractproperty <EOL> def denominator ( self ) : <EOL> raise NotImplementedError <EOL> def __float__ ( self ) : <EOL> """<STR_LIT>""" <EOL> return self . numerator / self . denominator <EOL> class Integral ( Rational ) : <EOL> """<STR_LIT>""" <EOL> @ abstractmethod <EOL> def __long__ ( self ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError <EOL> def __index__ ( self ) : <EOL> """<STR_LIT>""" <EOL> return long ( self ) <EOL> @ abstractmethod <EOL> def __pow__ ( self , exponent , modulus = None ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError <EOL> @ abstractmethod <EOL> def __lshift__ ( self , other ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError <EOL> @ abstractmethod <EOL> def __rlshift__ ( self , other ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError <EOL> @ abstractmethod <EOL> def __rshift__ ( self , other ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError <EOL> @ abstractmethod <EOL> def __rrshift__ ( self , other ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError <EOL> @ abstractmethod <EOL> def __and__ ( self , other ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError <EOL> @ abstractmethod <EOL> def __rand__ ( self , other ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError <EOL> @ abstractmethod <EOL> def __xor__ ( self , other ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError <EOL> @ abstractmethod <EOL> def __rxor__ ( self , other ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError <EOL> @ abstractmethod <EOL> def __or__ ( self , other ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError <EOL> @ abstractmethod <EOL> def __ror__ ( self , other ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError <EOL> @ abstractmethod <EOL> def __invert__ ( self ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError <EOL> def __float__ ( self ) : <EOL> """<STR_LIT>""" <EOL> return float ( long ( self ) ) <EOL> @ property <EOL> def numerator ( self ) : <EOL> """<STR_LIT>""" <EOL> return + self <EOL> @ property <EOL> def denominator ( self ) : <EOL> """<STR_LIT>""" <EOL> return <NUM_LIT:1> <EOL> Integral . register ( int ) <EOL> Integral . register ( long ) </s>
