title: Link to class method in python docstring
body: <p>I want to add a link to a method in my class from within the docstring of another method of the same class. I want the link to work in sphinx and preferentially also in Spyder and other Python IDE's.</p>
  
  <p>I tried several options and found only one that works, but it's cumbersome.</p>
  
  <p>Suppose the following structure in <code>mymodule.py</code></p>
  
  <pre><code>def class MyClass():
      def foo(self):
          print 'foo'
      def bar(self):
          """This method does the same as &lt;link to foo&gt;"""
          print 'foo'
  </code></pre>
  
  <p>I tried the following options for <code>&lt;link to foo&gt;</code>:</p>
  
  <ul>
  <li>:func:`foo`</li>
  <li>:func:`self.foo`</li>
  <li>:func:`MyClass.foo`</li>
  <li>:func:`mymodule.MyClass.foo`</li>
  </ul>
  
  <p>The only one that effectively produces a link is :func:`mymodule.MyClass.foo`, but the link is shown as <code>mymodule.MyClass.foo()</code> and I want a link that is shown as <code>foo()</code> or <code>foo</code>.<br>
  None of the options above produces a link in Spyder. </p>
  
  <p>Thanks for your help.</p>