What's wrong with this code snippet?
Karlo Lozovina
_karlo_ at _mosor.net_
Wed Jan 4 20:14:43 EST 2006
Dave Hansen <iddw at hotmail.com> wrote in
news:l8mor19a0kelraogseokc7qmqgafpda6ia at 4ax.com:
> I'm not sure what rn is, but it looks like a standard library
> random.Random object. If so, I don't think you want to seed your PRNG
> each time you use it -- your numbers might be much less random that
> way. If it is the standard library object, the PRNG is seeded when
> the module is first imported, so you may not need to seed it at all.
Yes, it is random module. So, what is the preferred way of seeding random
number generator? Just once in a file? Or something else?
I just needed some "random" choices to be made, so I didn't dig much into
random module. Anyway, thanks for pointing this out, appreciated.
--
_______ Karlo Lozovina - Mosor
| | |.-----.-----. web: http://www.mosor.net || ICQ#: 10667163
| || _ | _ | Parce mihi domine quia Dalmata sum.
|__|_|__||_____|_____|
More information about the Python-list
mailing list