How to call a two functions with unequal arguments using same function call?
<p>I have two definitions say,</p>

<p>file x.py:</p>

<pre><code>class x:

    def p(self, a, b) :
        # ...
</code></pre>

<p>file y.py:</p>

<pre><code>class y:

    def p(self, a, b, c) :
        # [...]
</code></pre>

<p>Now I am calling these functions from another file. Command line inputs having the file names (in this case x and y) are passed in <code>cust</code> variable.</p>

<p>file z.py:</p>

<pre><code>from x import  *
from y import  *

class z:

    cust.p(a, b, c)
</code></pre>

<p>x (or y) is being passed as the command line inputs to file z.py.<br>
<code>cust</code> is the class variable of class z.</p>

<p>Now when <code>cust = x</code> object I get an error: <code>takes exactly 2 arguments (3 given)</code>.</p>

<p>But when <code>cust = y</code> object it works fine.</p>

<p>How do i eliminate this error?</p>

<p>I do not want to modify the function definition in x.py and y.py files as there are many files.</p>

<p>How do i modify the code so that both the functions are called from the same function call <strong>without modifying</strong> the function definition?</p>
