class a(object):
class b:
a='aaa'
print a.b.a#print 'aaa'
b=a()
print b.b.a#print 'aaa'
thanks
class a(object):
class b:
a='aaa'
print a.b.a#print 'aaa'
b=a()
print b.b.a#print 'aaa'
thanks
Either ways, you are accessing: "outerclass/object.innerclass/object.member".
No.
To create instance variables, you need to explicitly prefix them with self., in the constructor method __init__(self).
In your code, you're simply assigning in the class scope, and those variables can be reached both ways.
Running your code and then a.b.a is b.b.a gives the result of True, which indicates that they are, indeed, referring to the same object - the class variable a of inner class b.