Using "self" in function arguments definition
<p>Instead of doing the following:</p>

<pre><code>def MyFunc(self, a, b, c)
    self.a = a
    self.b = b
    self.c = c
</code></pre>

<p>I want to do the following:</p>

<pre><code>def MyFunc(self, self.a, self.b, self.c)
</code></pre>

<p>Why does this not work?</p>

<p>If I have to use the first approach, is there any good way to make sure I don't unintentionally overwrite variables used elsewhere in the project with the same names (e.g. perhaps "a" is a variable used by another object).</p>

<p>I'm really not sure why you want to do something such as what you describe. It doesn't really make sense that parameters of a function are class attributes.</p>

<p>Now, if what your asking is how to stop the parameters <code>MyFunc()</code> from conflicting with the parameters of another function, then your covered. As was pointed out in the comments, Python has proper scope. So the parameters of <code>MyFunc()</code> will not conflict with any other variables/parameters.</p>

python