I am trying to reference an inner class from another inner class. I have tried both :
class Foo(object): class A(object): pass class B(object): other = A and
class Foo(object): class A(object): pass class B(object): other = Foo.A with respective results:
Traceback (most recent call last): File "python", line 1, in <module> File "python", line 6, in Foo File "python", line 7, in B NameError: name 'A' is not defined and
Traceback (most recent call last): File "python", line 1, in <module> File "python", line 6, in Foo File "python", line 7, in B NameError: name 'Foo' is not defined Is this possible?