protocol = {"start":initialiser,"hunt":hunter,"classify":classifier,....other
states}
def state_machine():
next_step = protocol["start"]()
while True:
next_step = protocol[next_step]()
Woot ! I'll keep this one in my mind, while I may not be that concerned
by speed unlike the OP, I still find this way of doing very simple and
so intuitive (one will successfully argue how I was not figuring this
out by myself if it was so intuitive).
Anyway I wanted to participated to this thread, as soon as I saw 'due to
python limitations' in the title, I foretold a hell of a thread ! This
is just provocation ! :-)
JM
--
http://mail.python.org/mailman/listinfo/python-list