title: Python: Decorated staticmethod receives non-callable method
body: <p>I'm having a little problem decorating a static method in Python. I think the following code best represents my problem:</p>
  
  <pre><code>def decorator(func):
      print callable(func)
      return func
  
  class Foo():
      @decorator
      @staticmethod
      def bar():
          return
  
  # outputs False
  
  print callable(Foo.bar) 
  # outputs True
  </code></pre>
  
  <p>This seems to be a bug. I imagine it arises because when the method <code>Foo.bar</code> is passed to the decorator, it is a function, not a method. That is the only reason I can see for it not being callable, for if we decorate a standard function, it is not callable, as shown below.</p>
  
  <pre><code>@staticmethod
  def function():
      return
  
  print callable(function) 
  # outputs False
  </code></pre>
  
  <p>So is this a true bug in implementation of the staticmethod decorator, and/or are there any simple workarounds? I did think of writing a decorator to asign a <code>__call__</code> attribute, but I don't know how <code>callable</code> is implemented, so I can't gauge the sucess of such a method.</p>