* Hugo González Monteverde <[EMAIL PROTECTED]> [051028 12:51]:
> Hi,
>
> There may be, but I do not understand what is it exactly what you are
> trying to do.
>
> If you're trying to implement a circular something that goes back to the
> first element after iterating the last one,
Yes. You are correct!
tj
> then I'd think of a list,
> and using some modulus when iterating.
> Can you explain more of what you are trying to do?
>
>
> Hugo
>
> Tim Johnson wrote:
> > Hello:
> >
> > # I have the following dictionary:
> > next_phases = {"open":"review","review":"write","write":"open"}
> >
> > # a 'phase is extracted by
> > next_phase = next_phases[self.phase
> >
> > Note that the value for each of the first keys is the key for
> > the next item, and that the value for the last key is the *first* key.
> >
> > Is there a different way to do this? Works fine for me this way, but
> > I'm just curious about an alternative, :-) expecially if it is better.
> >
> > thanks
> > tim
> >
> _______________________________________________
> Tutor maillist - [email protected]
> http://mail.python.org/mailman/listinfo/tutor
--
Tim Johnson <[EMAIL PROTECTED]>
http://www.alaska-internet-solutions.com
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor