Python inheritance and scoping question
<p>Edited because I'm a moron. Should have said class originally.</p>

<p>I have the code that does something like this:</p>

<p>file1.py</p>

<pre><code>class A(object):
  def __init__(self):
    stuff_here()

class B(object):
  def func(self):
    self.a = A()
</code></pre>

<p>file2.py</p>

<pre><code>import file1
class A(file1.A):
  def __init__(self):
    file1.A(self)
    self.thing = other_thing

class B(file1.B):
  pass
</code></pre>

<p>I would like that when I instantiate file2.B() it uses file2.A() for its member a, not file1.A()</p>

<p>Is there a way to do this? I tried looking at the python scoping rules but I'm misunderstanding it I think.</p>
