<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Dennis Lee Bieber: >> Presuming the <event x> is a type code I'd just set up a list of >> functions: >> Then create a dictionary of them, keyed by the <event x> code >> processors = { "1" : process_1, >> "2" : process_2, >> .... >> "x" : process_x } > > Just a dict of functions was my solution too, I think avoiding more > complex solutions is positive.
If the event codes start at 0 and run sequentially, a tuple or list would be even easier. -- http://mail.python.org/mailman/listinfo/python-list