CipoFuzo <cipofuzo at home.com> writes: > I'm trying to define a class inside of a class > and it doesn't work: [...] > Why do I get a namerror? Why is python looking for B in > the global namespace? class A: class B: pass def __init__(self): - self.element = B() + self.element = self.B() test = A() John