nested classes in Python
问题 Dealing with classes (nested etc) does not look easy in Python , surprisingly ! The following problem appeared to me recently and took several hours (try, search ...) without success. I read most of SO related links but none of them has pointed the issue presented here! #------------------------------------ class A: def __init__(self): self.a = 'a' print self.a class B(A): def __init__(self): self.b = 'b' A.a = 'a_b' print self.b, A.a #------------------------------------ class C: class A: