title: python - undefined variable?
body: <p>Does python have some undefined variable / debug mode which will output a notice/warning?</p>
  
  <p>PHP allows you to modify the error_reporting to turn on notice warnings which mean doing</p>
  
  <pre><code>&lt;?php
  echo $foo;
  </code></pre>
  
  <p>will throw an "Undefined variable foo on line 2.......</p>
  
  <p>does python have something similar?</p>
  
  <p>I had a bug where I was doing</p>
  
  <pre><code>db.connect
  </code></pre>
  
  <p>instead of</p>
  
  <pre><code>db.connect()
  </code></pre>
  
  <p>and I was hoping python would throw a 
  undefined variable connect...</p>
  
  <p>can you bump up the error reporting level or similar in python?</p>