Why does this choke?

John J. Lee jjl at pobox.com
Fri Nov 7 07:30:15 EST 2003


S Kemplay <skemplay at dingley.net> writes:

> I wrote a script to choose random dates for a statistics assignment.
> I only need to choose 30 dates from one year with no leap years and it works 
> fine. However I tested with different numbers of dates. It hangs from 450 up. 
> I only need 30 dates but it would be good to know why it hangs. (My coding 
> probably has something to do with it :))
[...]
>         if (day, month) in dates: 
>             continue
[...]

This looks like the culprit.  I bet it really hangs from 366 up <wink>.


John




More information about the Python-list mailing list