* Andrei <[EMAIL PROTECTED]> [051028 15:57]:
Andrei, I really like your approach. Will which up an object interface
for it. Will have other applications, I'm sure.
thanks
tim
> Tim Johnson wrote:
> > Hello:
> >
> > # I have the following dictionary:
> > next_phases = {"open":"review","review":"w
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 th
* Alan Gauld <[EMAIL PROTECTED]> [051028 14:05]:
> Tim,
>
> I don;t know if theres a better way but
>
> > next_phases = {"open":"review","review":"write","write":"open"}
> >
> > 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 i
Tim,
I don;t know if theres a better way but
> next_phases = {"open":"review","review":"write","write":"open"}
>
> 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.
But I think this is pretty neat, I like it. N
* 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
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, then I'd think of a list,
and using some modulus when iterating.
Can you explain more of
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*