tuple.index()
Hendrik van Rooyen
mail at microcorp.co.za
Thu Dec 21 00:51:58 EST 2006
"Nick Maclaren" <nmm1 at cus.cam.ac.uk> wrote:
> Not at all. I didn't say that they came in pairs. Consider:
>
> [str1, str2, agent1, str3, agent2, agent3, agent4, str4, ...]
>
> See Algol 68 for an example of this.
When I looked at the above, I went "tilt" -
If you had no a priori knowledge about how many strings
are associated with an agent - (or agents with a string),
then you could only identify an agent because it was not
a string, or if it had some other magic property...
I cannot imagine a use case for this that would not be better
done with a dict using the agents as keys - or are the strings the
keys?
If the strings are "inputs" and the agents "routines" - is the idea
to call the agents one after the other all with the same input, or
is agent3 called with the return value of agent2 like a systolic
array arrangement?
What would be the reason for doing it like this?
I am confused
- Hendrik
More information about the Python-list
mailing list