super() in Python 2.x without args
<p>Trying to convert <s><code>super(B, self).method()</code></s> into a simple nice <code>bubble()</code> call.
<strong>Did it</strong>, <a href="http://stackoverflow.com/questions/2706623/super-in-python-2-x-without-args/2706703#2706703">see below</a>!</p>

<p>Is it possible to get reference to class B in this example?</p>

<pre><code>class A(object): pass

class B(A):
    def test(self):
        test2()

class C(B): pass

import inspect
def test2():
    frame = inspect.currentframe().f_back
    cls = frame.[?something here?]
    # cls here should == B (class)

c = C()
c.test()
</code></pre>

<p>Basically, <code>C</code> is child of <code>B</code>, <code>B</code> is child of <code>A</code>. Then we create <code>c</code> of type <code>C</code>. Then the call to <code>c.test()</code> actually calls <code>B.test()</code> (via inheritance), which calls to <code>test2()</code>. </p>

<p><code>test2()</code> can get the parent frame <code>frame</code>; code reference to method via <code>frame.f_code</code>;
 <code>self</code> via <code>frame.f_locals['self']</code>; but <code>type(frame.f_locals['self'])</code> is <code>C</code> (of course), but not <code>B</code>, where method is defined.</p>

<p>Any way to get <code>B</code>?</p>
