title: Best practice for using assert?
body: <ol>
  <li>Is there a performance or code maintenance issue with using <code>assert</code> as part of the standard code instead of using it just for debugging purposes?</li>
  </ol>
  <p>Is</p>
  <pre><code>    assert x &gt;= 0, 'x is less than zero'
  </code></pre>
  <p>better or worse than</p>
  <pre><code>    if x &lt; 0:
          raise Exception('x is less than zero')
  </code></pre>
  <ol start="2">
  <li>Also, is there any way to set a business rule like <code>if x &lt; 0 raise error</code> that is always checked without the <code>try/except/finally</code> so, if at anytime throughout the code <code>x</code> is less than 0 an error is raised, like if you set <code>assert x &lt; 0</code> at the start of a function, anywhere within the function where <code>x</code> becomes less then 0 an exception is raised?</li>
  </ol>