Hi girls & guys,<br><br>Just joined the group. I'm new to Python but been picking it up pretty easy. I love it! I'm hoping to use it to make a controlling application for an experiment. Basically I want to use it to interface with some data acquisition (DAQ) hardware to accept incoming signals and respond sending signals to the outputs. I'm looking for an efficient State Machine algorithm as I need the timing to be as good as possible.<br>
As there is no switch statement in Python, I've been looking around for a good implementation. Most of the algorithms I've come across seem to be based on parsing applications. I'd like something more suited to my needs. I'd like to avoid excessive use of 'if-elif-else' statements as each would have to be checked to find the right conditions which would have an time overhead involved. I have seen an implementation of the switch using dictionaries but someone had commented that creating and throwing away dictionaries also comes at a cost.<br>
I was wondering if any of you could advise or point me in the right direction.<br><br>Any help would be greatly appreciated.<br><br>Thanks,<br><br>Jack<br>