title: Rewrite python function without inspect module
body: <p>How would I write this introspective function without using the inspect module.  </p>
  
  <pre><code>import inspect
  
  def trace(cls):
      for name, m in inspect.getmembers(cls, inspect.ismethod):
          setattr(cls,name,log(m))
      return cls
  </code></pre>
  
  <p>The above is from <a href="https://stackoverflow.com/questions/5481623/python-dynamically-add-decorator-to-class-methods-by-decorating-class/5481729#5481729">this SO question/answer</a> </p>
  
  <p><strong>Edit/Clarification:
  Is it possible to do this without any imports also?</strong></p>
  
  <p>Note this is not a real use case rather a pure and simple case of curiosity on my part. </p>