Why does this choke?

S Kemplay skemplay at dingley.net
Fri Nov 7 07:48:17 EST 2003


Thanks John, that explains it :)

Sean Kemplay

On Friday 07 November 2003 23:30, John J. Lee wrote:
> 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