[Tutor] Overriding a method in a class
Terry Carroll
carroll at tjc.com
Mon May 16 01:07:29 CEST 2011
On Sat, 14 May 2011, Alan Gauld wrote:
> Is there any reason you can'tt override in the uisual way by inheritance?
Doh! Of course I should. I've written plenty of classes before, but
never one intended to be inherited, and now that you point it out, it's
obvious that that's what I should be doing here. Thanks.
On Sat, 14 May 2011, Peter Otten wrote:
> If you define a function in the class body and then instantiate that
> class.... [snip]
> You can find a thorough explanation at
> http://users.rcn.com/python/download/Descriptor.htm
Thanks, Peter; that's very helpful. I'll read that page in detail.
More information about the Tutor
mailing list