title: Decorator error: NoneType object is not callable
body: <p>I wrote a function decorator like this:</p>
  
  <pre><code>def tsfunc(func):
      def wrappedFunc():
          print '%s() called' % func.__name__
          return func()
      return wrappedFunc()
  
  @tsfunc
  def foo():
      pass
  
  foo()  # to get it work, use foo instead of foo()
  foo()
  </code></pre>
  
  <p>I got following error message:</p>
  
  <pre><code>foo() called
  Traceback (most recent call last):
    File "decorator.py", line 11, in &lt;module&gt;
      foo()
  TypeError: 'NoneType' object is not callable
  </code></pre>
  
  <p>I get it work by replacing "foo()" with "foo". but I still didn't get the result I expected:</p>
  
  <pre><code>foo() called
  </code></pre>
  
  <p>seems like the <code>foo</code> function is only called once.</p>
  
  <p>Please help me understand why this is happening.</p>