(self, a=None, version=2)
Initialize internal state from hashable object.

        None or no argument seeds from current time or from an operating
        system specific randomness source if available.

        For version 2 (the default), all of the bits are used if *a *is a str,
        bytes, or bytearray.  For version 1, the hash() of *a* is used instead.

        If *a* is an int, all bits are used.
Initialize internal state from hashable object.
Initialize internal state from hashable object .
def seed(self, a=None, version=2):
        """Initialize internal state from hashable object.

        None or no argument seeds from current time or from an operating
        system specific randomness source if available.

        For version 2 (the default), all of the bits are used if *a *is a str,
        bytes, or bytearray.  For version 1, the hash() of *a* is used instead.

        If *a* is an int, all bits are used.

        """

        if a is None:
            try:
                a = int.from_bytes(_urandom(32), 'big')
            except NotImplementedError:
                import time
                a = int(time.time() * 256) # use fractional seconds

        if version == 2:
            if isinstance(a, (str, bytes, bytearray)):
                if isinstance(a, str):
                    a = a.encode()
                a += _sha512(a).digest()
                a = int.from_bytes(a, 'big')

        super().seed(a)
        self.gauss_next = None
def seed ( self , a = None , version = 2 ) : if a is None : try : a = int . from_bytes ( _urandom ( 32 ) , 'big' ) except NotImplementedError : import time a = int ( time . time ( ) * 256 ) # use fractional seconds if version == 2 : if isinstance ( a , ( str , bytes , bytearray ) ) : if isinstance ( a , str ) : a = a . encode ( ) a += _sha512 ( a ) . digest ( ) a = int . from_bytes ( a , 'big' ) super ( ) . seed ( a ) self . gauss_next = None