python newbie

Philip Swartzleonard starx at pacbell.net
Mon Apr 8 00:10:41 EDT 2002


Peter Hansen || Sun 07 Apr 2002 03:51:32p:

>> >>I'm using the time module to make part of the game random and
> [...]
>> >
>> > Use the random module.
>> 
>> Yep. For example:
>> 
>> ---
>> import random
>> 
>> # No vaule - uses time on it's own
>> random.seed()
> 
> Random seeds itself using time.time() so this is unnecessary 
> in simple code.

Ah, yes, I didn't realize -- i thought the standard way of using a 
randomizer with a constant seed (for debug), was to just not call the seed 
function -- i may be wrong. I guess in python you'd just call 'seed
(some_number_i_like)' to do this :).

-- 
Philip Sw "Starweaver" [rasx] :: www.rubydragon.com



More information about the Python-list mailing list