Classes in a class: how to access variables from one in another

fab at fab at
Mon Oct 18 15:09:33 CEST 2010


I have a class A that contains two classes B and C:

class A:
  class B:
    self.x = 2
  class C:

Is there a way to access the x  defined in B in class C?


F. Delente

More information about the Python-list mailing list