title: Debug and Release Build Strategy for Python Projects
body: <p>I have a piece of software (2100 SLOC) that I consider to run in two different versions: one version provides verbose debug information to the console and the other version is an optimized release version.</p>
  
  <p>My goal is to have a single <code>git</code> branch to maintain. Is there a way to mark the debug parts of the code and signal the Python interpreter to ignore these parts of the code?</p>
  
  <p>Possible applications include: print statements, Python's logging facility, profiling, and <strike>assertions</strike> [Edit: These are apparently ignored by setting the <code>-O</code> flag].</p>