title: How to check source code of a python method?
body: <p>To be short, suppose I have a string <code>'next'</code>,</p>
  
  <pre><code>next = "123rpq"
  </code></pre>
  
  <p>and I can apply a <code>str</code> method <code>.isdigit()</code> to <code>'next'</code>. So my question is how to check the implementation of this method. Hence is there a thing like <code>inspect.getsource(somefunction)</code> to get the source code of a 'method'?</p>
  
  <p>UPDATE: see comment about variable name <code>'next'</code> below.</p>