[Tutor] A beginner having problems with inheritance
s.shall at virginmedia.com
Wed Jul 2 15:36:36 CEST 2014
On 01/07/2014 19:04, Sydney Shall wrote:
> 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.
My apologies to the tutors.
I have identified my error, which was predictably elementary.
With many thanks,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor