title: python class output at the interpreter
body: <p>I have the following python class:</p>
  
  <pre><code>class uf_node:
      def __init__(self, Vertex):
          self.vertex = Vertex
          self.rep = Vertex
  
      def set_rep(self, Rep):
          self.rep = Rep
  </code></pre>
  
  <p>Now, at the interpreter I do the following:</p>
  
  <pre><code>&gt;&gt;&gt; from uf_node import *
  &gt;&gt;&gt; u = uf_node('a')
  &gt;&gt;&gt; u
  &lt;uf_node.uf_node instance at 0x7f56069ca758&gt;
  </code></pre>
  
  <p>Can one get better output, perhaps creating something like a 'toString()' function that would automatically be called when you try to print the object?</p>