title: Strangeness with a decorator
body: <p>I want to make a decorator which will catch exceptions and adequately logged their.</p>
  
  <pre><code>def logger(foo):
      try:
          print foo()
      except Exception as e:
          print e
  
  @logger
  def d():
      return 2/2
  
  if __name__ == '__main__':
      d()
  </code></pre>
  
  <p>Thats right i think, but then I run it and I have an exception like this:</p>
  
  <pre><code>1
  
  Traceback (most recent call last):
  
    File "log.py", line 14, in &lt;module&gt;
  
      d()
  
  TypeError: 'NoneType' object is not callable
  </code></pre>
  
  <p>Why interpreter tells me that the function has None type, but call it and print answer?</p>