[Python-Dev] RE: [Python-checkins] python/nondist/pepspep-0323.txt, NONE, 1.1 pep-0000.txt, 1.254, 1.255 (original) (raw)
Raymond Hettinger python at rcn.com
Tue Oct 28 12:09:55 EST 2003
- Previous message: [Python-Dev] RE: [Python-checkins] python/nondist/peps pep-0323.txt, NONE, 1.1 pep-0000.txt, 1.254, 1.255
- Next message: [Python-Dev] RE: [Python-checkins] python/nondist/pepspep-0323.txt, NONE, 1.1 pep-0000.txt, 1.254, 1.255
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
[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.
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.
If you need a copy, run it through tee().
Raymond
- Previous message: [Python-Dev] RE: [Python-checkins] python/nondist/peps pep-0323.txt, NONE, 1.1 pep-0000.txt, 1.254, 1.255
- Next message: [Python-Dev] RE: [Python-checkins] python/nondist/pepspep-0323.txt, NONE, 1.1 pep-0000.txt, 1.254, 1.255
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]