"Peter Otten" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Alan Isaac wrote: > There is nothing wrong with the random module -- you get the same numbers on > every run. When there is no pyc-file Python uses some RAM to create it and > therefore your GridPlayer instances are located in different memory > locations and get different hash values. This in turn affects the order in > which they occur when you iterate over the GridPlayer.players_played set.
Thanks!! This also explains Steven's results. If I sort the set before iterating over it, the "anomaly" disappears. This means that currently the use of sets (and, I assume, dictionaries) as iterators compromises replicability. Is that a fair statement? For me (and apparently for a few others) this was a very subtle problem. Is there a warning anywhere in the docs? Should there be? Thanks again!! Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list