MCPcopy Index your code
hub / github.com/python/cpython / random

Method random

Lib/random.py:898–900  ·  view source on GitHub ↗

Get the next random number in the range 0.0 <= X < 1.0.

(self)

Source from the content-addressed store, hash-verified

896 """
897
898 def random(self):
899 """Get the next random number in the range 0.0 <= X < 1.0."""
900 return (int.from_bytes(_urandom(7)) >> 3) * RECIP_BPF
901
902 def getrandbits(self, k):
903 """getrandbits(k) -> x. Generates an int with k random bits."""

Callers 12

mulFunction · 0.45
plusFunction · 0.45
mulFunction · 0.45
plusFunction · 0.45
uniformMethod · 0.45
triangularMethod · 0.45
expovariateMethod · 0.45
paretovariateMethod · 0.45
weibullvariateMethod · 0.45
_random_dataFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected