title: how do you obtain the address of an instance after overriding the __str__ method in python
body: <pre><code>class Bar:
       pass
  
  class Foo:
       def __str__(self): return "Foo instance"
  
  &gt;&gt; aBar = Bar()
  &gt;&gt; print aBar
  &lt;__main__.Bar instance at 0x100572a28&gt;
  &gt;&gt; aFoo = Foo()
  &gt;&gt; print aFoo
  Foo instance
  </code></pre>
  
  <p>is there a way to print out the address of aFoo after overriding the <strong>str</strong> method?</p>
  
  <p>using</p>
  
  <pre><code> &gt;&gt;repr(aFoo) 
  </code></pre>
  
  <p>solved my problem</p>