generators : random shootout

GerritM gmuller at worldonline.nl
Tue Jan 15 15:08:02 EST 2002


"Mark McEahern" <marklists at mceahern.com> schreef in bericht
a few days ago a solution with zip was suggested to shorten this piece of
code:

>     gr = gen_random(100.0)
>     for i in xrange(1, N):
>         gr.next()
<...snip...>>

can this instead be replaced by:

for i in gen_random(100.0): pass

regards Gerrit
--
www.extra.research.philips.com/natlab/sysarch






More information about the Python-list mailing list