title: How to check if __str__ is implemented by an object
body: <p>I want to dynamically implement <code>__str__</code> method on a object if the object doesn't already implement it. </p>
  
  <p>I try using <code>hasattr(obj, '__str__')</code> it always returns me true as it picks it up from object class. </p>
  
  <p>Is there a way to determine if an object actually implements <code>__str__</code> ?</p>
  
  <p>I know I can use <code>inspect.getmembers(obj)</code> but I am searching for a more pythonic way</p>
  
  <p><strong>EDIT</strong></p>
  
  <pre><code>class Employee(object):
  def __init__(self, name, age, emp_code):
      self.name = name
      self.age  = age
      self.emp_code = emp_code
  </code></pre>
  
  <p><strong>Test</strong></p>
  
  <pre><code>e = Employee("A", 23, "E1")
  print hasattr(e, '__str__')
  &gt;&gt; True
  </code></pre>
  
  <p>I want a check that returns <code>False</code> instead of picking up the method inherited from <code>object</code>.</p>