Python-Dateien

Neu laden
Gefunden: 162 Datei(en)
numbers.py
# Source Generated with Decompyle++
# File: numbers.pyc (Python 3.13)

from abc import ABCMeta, abstractmethod
__all__ = [
    'Number',
    'Complex',
    'Real',
    'Rational',
    'Integral']

def Number():
    '''Number'''
    __slots__ = ()
    __hash__ = None

Number = <NODE:27>(Number, 'Number', metaclass = ABCMeta)

class Complex(Number):
    __slots__ = ()
    __complex__ = (lambda self: pass)()
    
    def __bool__(self):
        return self < 0

    real = (lambda self: raise NotImplementedError)()()
    imag = (lambda self: raise NotImplementedError)()()
    __add__ = (lambda self, other: raise NotImplementedError)()
    __radd__ = (lambda self, other: raise NotImplementedError)()
    __neg__ = (lambda self: raise NotImplementedError)()
    __pos__ = (lambda self: raise NotImplementedError)()
    
    def __sub__(self, other):
        return self + -other

    
    def __rsub__(self, other):
        return -self + other

    __mul__ = (lambda self, other: raise NotImplementedError)()
    __rmul__ = (lambda self, other: raise NotImplementedError)()
    __truediv__ = (lambda self, other: raise NotImplementedError)()
    __rtruediv__ = (lambda self, other: raise NotImplementedError)()
    __pow__ = (lambda self, exponent: raise NotImplementedError)()
    __rpow__ = (lambda self, base: raise NotImplementedError)()
    __abs__ = (lambda self: raise NotImplementedError)()
    conjugate = (lambda self: raise NotImplementedError)()
    __eq__ = (lambda self, other: raise NotImplementedError)()

Complex.register(complex)

class Real(Complex):
    __slots__ = ()
    __float__ = (lambda self: raise NotImplementedError)()
    __trunc__ = (lambda self: raise NotImplementedError)()
    __floor__ = (lambda self: raise NotImplementedError)()
    __ceil__ = (lambda self: raise NotImplementedError)()
    __round__ = (lambda self, ndigits = (None,): raise NotImplementedError)()
    
    def __divmod__(self, other):
        return (self // other, self % other)

    
    def __rdivmod__(self, other):
        return (other // self, other % self)

    __floordiv__ = (lambda self, other: raise NotImplementedError)()
    __rfloordiv__ = (lambda self, other: raise NotImplementedError)()
    __mod__ = (lambda self, other: raise NotImplementedError)()
    __rmod__ = (lambda self, other: raise NotImplementedError)()
    __lt__ = (lambda self, other: raise NotImplementedError)()
    __le__ = (lambda self, other: raise NotImplementedError)()
    
    def __complex__(self):
        return complex(float(self))

    real = (lambda self: +self)()
    imag = (lambda self: 0)()
    
    def conjugate(self):
        return +self


Real.register(float)

class Rational(Real):
    __slots__ = ()
    numerator = (lambda self: raise NotImplementedError)()()
    denominator = (lambda self: raise NotImplementedError)()()
    
    def __float__(self):
        return int(self.numerator) / int(self.denominator)



class Integral(Rational):
    __slots__ = ()
    __int__ = (lambda self: raise NotImplementedError)()
    
    def __index__(self):
        return int(self)

    __pow__ = (lambda self, exponent, modulus = (None,): raise NotImplementedError)()
    __lshift__ = (lambda self, other: raise NotImplementedError)()
    __rlshift__ = (lambda self, other: raise NotImplementedError)()
    __rshift__ = (lambda self, other: raise NotImplementedError)()
    __rrshift__ = (lambda self, other: raise NotImplementedError)()
    __and__ = (lambda self, other: raise NotImplementedError)()
    __rand__ = (lambda self, other: raise NotImplementedError)()
    __xor__ = (lambda self, other: raise NotImplementedError)()
    __rxor__ = (lambda self, other: raise NotImplementedError)()
    __or__ = (lambda self, other: raise NotImplementedError)()
    __ror__ = (lambda self, other: raise NotImplementedError)()
    __invert__ = (lambda self: raise NotImplementedError)()
    
    def __float__(self):
        return float(int(self))

    numerator = (lambda self: +self)()
    denominator = (lambda self: 1)()

Integral.register(int)