title: Is it better to have standalone functions in globals or group them in a class?
body: <p>I have inherited code in which there are standalone functions, one per country code. E.g.</p>
  
  <pre><code>def validate_fr(param):
      pass
  
  def validate_uk(param):
      pass
  </code></pre>
  
  <p>My idea is to create a class to group them together and consolidate the code into one method. Unfortunately that breaks cohesion. Another option is to dispatch to instance methods ?</p>
  
  <pre><code>class Validator(object):
      def validate(param, country_code):
         # dispatch 
  </code></pre>
  
  <p>Alas, python does not have a switch statement. </p>
  
  <p><strong>UPDATE:</strong> I am still not convinced why I should leave them as global functions in my module. Lumping them as class methods seems cleaner.</p>