title: Difference between decorator classes and decorator functions
body: <p>I guess that's how they are called, but I will give examples just in case.</p>
  
  <p>Decorator class:</p>
  
  <pre><code>class decorator(object):
      def __init__(self, func):
          self.func = func
  
      def __call__(self, *args, **kwargs):
          print 'something'
          self.func(*args, **kwargs)
  </code></pre>
  
  <p>Decorator function:</p>
  
  <pre><code>def decorator(func):
      def wrapper(*args, **kwargs):
          print 'something'
          return func(*args, **kwargs)
      return wrapper
  </code></pre>
  
  <p>Is using one or the other just a matter of taste? Is there any practical difference?</p>