B
is available in the scope of A
class - use A.B
:
class A(object):
def __init__(self):
self.B()
class B(object):
def __init__(self):
super(A.B, self).__init__()
print 'OK'
A()
See documentation on Python Scopes and Namespaces.