Python how to use the __str__ code for the __repr__? : <p>I've stated programming in Phyton just few days ago, so I'm sorry if the question is quite easy.</p>

<p>I've written this code:</p>

<pre><code>&gt;&gt;&gt; class Polynomial:
        def __init__(self, coeff):
            self.coeff=coeff
        def __repr_(self):
            return str(self)
        def __str__(self):
            s=''
            flag=0;
            for i in reversed(range(len(self.coeff))):
                if(i==0):
                    s+= '+ %g ' % (self.coeff[i])
                elif (flag==0):
                    flag=1
                    s+= '%g z**%d' % (self.coeff[i],i)
                else:
                    s+= '+ %g z**%d ' % (self.coeff[i],i)
            return s
</code></pre>

<p>but <code>__repr__</code> is not working:</p>

<pre><code>&gt;&gt;&gt; p= Polynomial([1,2,3])
&gt;&gt;&gt; p
&lt;__main__.Polynomial instance at 0x7fd3580ad518&gt;
&gt;&gt;&gt; print p
3 z**2+ 2 z**1 + 1 
</code></pre>

<p>How can i use the code wrritten in <code>def __str__(self):</code> without re-writining it? I couldn't find the answer anywhere else.
thanks.</p>
