title: Function definition in Python takes a lot of time
body: <p>Why is python trying to calculate the value of <code>p</code> during definition? It takes ages to define this function. </p>
  
  <pre><code>def f():
      raise Exception('Some error')
      p = 2322111239**42322222334923492304923
  
  print 'Defined!'
  </code></pre>
  
  <p>Also if the value of <code>p</code> is being calculated during definition, why is it possible to define this function without errors?</p>
  
  <pre><code>def f():
      return 4
      p = 11/0
  </code></pre>
  
  <p>This one obviously works fine because constants are not involved:</p>
  
  <pre><code>def f():
      raise Exception('Some error')
      x=42322222334923492304923
      p = 2322111239**x
  
  print 'Defined!'
  </code></pre>