Hello, I'm experimenting with basic inheritance concepts, and something that I would assume to work returns an error.
>>> class A: ... def __init__( self ): ... self.a = 13 ... >>> class B( A ): # create sub-class of class A ... def __init__( self ): ... self.b = 14 ... >>> >>> >>> >>> b = B() # create instance of class B >>> b.a # here I would expect the class A's a attibute to be accessible... Traceback (most recent call last): File "<stdin>", line 1, in ? AttributeError: B instance has no attribute 'a' Anyone can shed any light on this? Using Python 2.3.4. Thanks Bernard _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor