A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2001-February/012891.html below:

[Python-Dev] random.jumpback?

[Python-Dev] random.jumpback? [Python-Dev] random.jumpback?Tim Peters tim.one@home.com
Wed, 14 Feb 2001 00:34:35 -0500
[Skip Montanaro]
> I was adding __all__ to the random module and I noticed this very
> unpythonic example in the module docstring:
>
>     >>> g = Random(42)  # arbitrary
>     >>> g.random()
>     0.25420336316883324
>     >>> g.jumpahead(6953607871644L - 1) # move *back* one
>     >>> g.random()
>     0.25420336316883324

Did you miss the sentence preceding the example, starting "Just for fun"?

> Presuming backing up the seed is a reasonable thing to do
> ...

It isn't -- it's just for fun.

> (I haven't got much experience with random numbers),

If you did, you would have been howling with joy at how much fun you were
having <wink>.




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4