title: Is it better to use an exception or a return code in Python?
body: <p>You may know this recommendation from Microsoft about the use of exceptions in .NET:</p>
  
  <blockquote>
    <p>Performance Considerations</p>
    
    <p>... </p>
    
    <p>Throw exceptions only for
    extraordinary conditions, ...</p>
    
    <p>In addition, do not throw an exception
    when a return code is sufficient...</p>
  </blockquote>
  
  <p>(See the whole text at <a href="http://msdn.microsoft.com/en-us/library/system.exception.aspx" rel="noreferrer">http://msdn.microsoft.com/en-us/library/system.exception.aspx</a>.)</p>
  
  <p>As a point of comparison, would you recommend the same for Python code? </p>