title: Refactoring if statements in python
body: <p>I would like to consult some piece of code with you. I have:</p>
  
  <pre><code>if tuple_type == Operation.START_SERVER:
      dictionary = ServersDictionary()
      dictionary.start(some_param)
  elif tuple_type == Operation.STOP_SERVER:
      dictionary = ServersDictionary()
      dictionary.stop(some_param)
  (...)
  elif tuple_type == Operation.START_APP:
      dictionary = AppsDictionary()
      dictionary.start(some_param)
  elif ...
  (....)
  </code></pre>
  
  <p>And there I have 27 if / elifs. Normally, I would go into map - function dispatcher, but after every if / elif I have two lines of code with same <i>dictionary</i> reference. Would you suggest me some clean solution to replace those ugly constructions? </p>
  
  <p>Creating 27 classes for applying polymorphism or 27 functions doesn't sound good... what do you think?</p>