[Tutor] A beginner having problems with inheritance

Sydney Shall s.shall at virginmedia.com
Tue Jul 1 19:04:39 CEST 2014


I am a beginner and I have always had problems with inheritance.

I can get inheritance to work with very simple classes.
But with more complex classes, I find that inheritance seems to work for 
simple variables, but I cannot get it to work with lists or arrays.
Specifically my problem is to access a numpy array in the parent class, 
from within the derived class.
When I test with instances in IPython everything works properly.
But I thought, perhaps wrongly, that with direct inheritance one does 
not need instances.
If one needs instances, how does one create them so that they are 
correctly recognised.

Perhaps, I need to read more about inheritance, Any suggestions for 
reading would be welcome.

With many thanks.

-- 
Sydney Shall


More information about the Tutor mailing list