I have tried making a switch like statement in python, instead of having a lot of if statements.
The code looks like this:
def findStuff(cds): L
With "get" method, you can have the same effect as "switch..case" in C.
Marcin example :
switch_dict = { Foo: self.doFoo, Bar: self.doBar, } func = switch_dict.get(switch_var, self.dodefault) result = func() # or if they take args, pass args