Discuss Super class methods in the Python Programming forum on Dev Shed. Super class methods Python Programming forum discussing coding techniques, tips and tricks, and Zope related information. Python was designed from the ground up to be a completely object-oriented programming language.
Time spent in forums: 1 Day 5 h 17 m 12 sec
Reputation Power: 13
yeah, i realised that the superclass method is calling one of its other methods.
The superclass' method does stuff and calls another one of its methods (that is must be overridden by a subclass). So I i've overridden it in my subclass, but when I call the superclass' method, it does the work and then calls its other method (which just returns an error string) instead of calling my overridden method. arghh!
When I hadn't overridden meth1, and just used the inherited meth1 it worked fine and called the overridden meth2(in SubClass), but now that I've overridden meth1 (and called its super version) it calls SuperClass' meth2 instead of SubClass'.
Is there a way of getting meth1, to call meth2 in the subclass. Am I going wrong somewhere? I'm not really able to change SuperClass.meth1