Python scoping and class/instance/inheritance namespaces
<p>Given</p>

<pre><code>class A:
    x = 'Ac'
    def f(self):
        return self.x

class B(A):
    x = 'Bc'
    def f(self):
        return self.x

class C(A):
    x = 'Cc'
    def f(self):
        return self.x

class D(B, C):
    x = 'Dc'
    def __init__(self):
        self.x = 'Di'
    def f(self):
        return self.x

d = D()
</code></pre>

<ol>
<li><p>What is the name resolution order for <code>d.x</code>?  E.g. <code>Di, Dc, Bc, Cc, Ac</code></p></li>
<li><p>What is the name resolution order for <code>super(D, d).x</code>?</p></li>
<li><p>What is the nro for <code>self.x</code> in <code>super(D, d).f()</code>?  Is it the same as for <code>d.f()</code>?</p></li>
<li><p>What is the nro for <code>D.x</code>?</p></li>
<li><p>If I assign to <code>d.x</code> and <code>Di</code> wasn't there, where will it go? E.g. <code>Di</code> or <code>Dc</code></p></li>
<li><p>If I assign to <code>D.x</code> and <code>Dc</code> wasn't there, where will it go?</p></li>
<li><p>If I assign to <code>super(D, d).x</code> and <code>Bc</code> wasn't there, where will it go? E.g. <code>Di</code> or <code>Dc</code> or <code>Bc</code></p></li>
</ol>
