list/dictionary as case statement ?
S.Mientki-nospam at mailbox.kun.nl
Tue Jan 2 23:08:31 CET 2007
If I'm not mistaken, I read somewhere that you can use
function-names/references in lists and/or dictionaries, but now I can't
find it anymore.
The idea is to build a simulator for some kind of micro controller (just
as a general practise, I expect it too be very slow ;-).
1: ('MOV', function1, ...),
2: ('ADD', function2, ),
3: ('MUL', class3.function3, )
# do something complex
Is this possible ?
More information about the Python-list