title: Embedded Python: TypeError: code() takes exactly 2 arguments (1 given)
body: <p>Our tool has python embedded.  We defined a function which takes 'two' arguments (but only one user argument):</p>
  
  <pre><code>def code(self, device):
          return tools.code(self, device)
  </code></pre>
  
  <p>Everything works well when they actually call the function with one argument:</p>
  
  <pre><code>code(device)
  </code></pre>
  
  <p>The problem arises when a user makes a call without any arguments at all eg:</p>
  
  <pre><code>code()
  </code></pre>
  
  <p>Now the error message returned by the python interpreter is: </p>
  
  <pre><code>TypeError: code() takes exactly 2 arguments (1 given)
  </code></pre>
  
  <p>Now the user thinks there should be 2 arguments, when in fact they only need to provide one - is there a way to improve this error message?</p>