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/2003-October/039712.html below:

[Python-checkins] python/nondist/pepspep-0323.txt, NONE, 1.1 pep-0000.txt, 1.254, 1.255

[Python-Dev] RE: [Python-checkins] python/nondist/pepspep-0323.txt, NONE, 1.1 pep-0000.txt, 1.254, 1.255Raymond Hettinger python at rcn.com
Tue Oct 28 12:09:55 EST 2003
[Alex]
> Btw, random.py doesn't seem to supply pseudo-random iterators --
> easy to make e.g. with iter(random.random, None) [assuming you
> want a nonterminating one],

Probably a bit faster with:

	starmap(random.random, repeat(()))



> but that wouldn't be copyable.  Should
> something be done about that...?

No.

1) The use case is not typical.  Other than random.random() and
time.ctime(), it is rare to see functions of zero arguments that
usefully return an infinite sequence of distinct values.

2) If you need a copy, run it through tee(). 



Raymond


More information about the Python-Dev mailing list

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