Python - Is it okay to pass self to an external function
<p>I have a class, A, which is inherited by a bunch of other classes. Some of these have a few functions which are similar and it would be nice to have those functions defined somewhere else and called by the classes that need them. But those functions call functions defined in the super class.</p>

<pre><code>class A():
    def imp_func(*args):
        # called by the child class functions

Class B(A):
    def common_func(self):
        # some stuff
        self.imp_func(*args)
</code></pre>

<p>So I have created my helper functions which take the <code>self object</code> as an argument and I can call the <code>imp_func</code> from inside the helper functions.</p>

<pre><code>def helper_func(obj, some_args):
    # some common stuff
    obj.imp_func(*args)

class B(A):
    def common_func(self):
        # unique stuff
        helper_func(self, some_args)
</code></pre>

<p>This solves the problem.</p>

<p>But should I be doing this? Is this Pythonic? </p>
