On 2010-10-18, <[email protected]> <[email protected]> wrote: > Hello. > > 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?
That's not valid Python code. Do you mean:
Class A:
Class B:
x = 2
or
Class A:
Class B:
def __init__(self):
self.x = 2
--
Neil Cerutti
--
http://mail.python.org/mailman/listinfo/python-list
