title: Pythonic way to have a choice of 2-3 options as an argument to a function
body: <p>I have a Python function which requires a number of parameters, one of which is the type of simulation to perform. For example, the options could be "solar", "view" or "both.</p>
  
  <p>What is a Pythonic way to allow the user to set these?</p>
  
  <p>I can see various options:</p>
  
  <ol>
  <li><p>Use a string variable and check it - so it would be <code>func(a, b, c, type='solar')</code></p></li>
  <li><p>Set some constants in the class and use <code>func(a, b, c, type=classname.SOLAR)</code></p></li>
  <li><p>If there are only two options (as there are for some of my functions) force it into a True/False argument, by using something like <code>func(a, b, c, do_solar=False)</code> to get it to use the 'view' option.</p></li>
  </ol>
  
  <p>Any preferences (or other ideas) for Pythonic ways of doing this?</p>