random :: SystemRandom :: Class SystemRandom
[hide private]
[frames] | no frames]

Class SystemRandom

source code

    object --+        
             |        
_random.Random --+    
                 |    
            Random --+
                     |
                    SystemRandom

Alternate random number generator using sources provided
by the operating system (such as /dev/urandom on Unix or
CryptGenRandom on Windows).

 Not available on all systems (see os.urandom() for details).



Instance Methods [hide private]
 
_notimplemented(self, *args, **kwds)
Method should not be called for a system random number generator.
source code
 
_stub(self, *args, **kwds)
Stub method.
source code
 
getrandbits(k)
Generates a long int with k random bits.
source code
 
getstate(self, *args, **kwds)
Method should not be called for a system random number generator.
source code
 
jumpahead(self, *args, **kwds)
Stub method.
source code
 
random(self)
Get the next random number in the range [0.0, 1.0).
source code
 
seed(self, *args, **kwds)
Stub method.
source code
 
setstate(self, *args, **kwds)
Method should not be called for a system random number generator.
source code

Inherited from Random: __getstate__, __init__, __reduce__, __setstate__, betavariate, choice, expovariate, gammavariate, gauss, lognormvariate, normalvariate, paretovariate, randint, randrange, sample, shuffle, uniform, vonmisesvariate, weibullvariate

Inherited from Random (private): _randbelow

Inherited from _random.Random: __getattribute__, __new__

Inherited from object: __delattr__, __hash__, __reduce_ex__, __repr__, __setattr__, __str__

Class Variables [hide private]

Inherited from Random: VERSION

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

_notimplemented(self, *args, **kwds)

source code 
Method should not be called for a system random number generator.
Returns:
None

_stub(self, *args, **kwds)

source code 
Stub method. Not used for a system random number generator.
Returns:
None

getrandbits(k)

source code 
Generates a long int with k random bits.
Returns:
x

Overrides: _random.Random.getrandbits

getstate(self, *args, **kwds)

source code 
Method should not be called for a system random number generator.
Returns:
None

Overrides: Random.getstate

jumpahead(self, *args, **kwds)

source code 
Stub method. Not used for a system random number generator.
Returns:
None

Overrides: _random.Random.jumpahead

random(self)

source code 
Get the next random number in the range [0.0, 1.0).
Returns:
x in the interval [0, 1).

Overrides: _random.Random.random

seed(self, *args, **kwds)

source code 
Stub method. Not used for a system random number generator.
Returns:
None

Overrides: Random.seed

setstate(self, *args, **kwds)

source code 
Method should not be called for a system random number generator.
Returns:
None

Overrides: Random.setstate