Creating subclassess (newbie)

Duncan Booth me at
Mon Jun 21 17:02:39 CEST 2004

Adam <adamc at> wrote in news:20040621153854.14f10a9f at debian:

> What is the best way of creating (coding) subclasses?
> Alternatively, is there any good documentation on the web
> for doing this? 

Have you tried reading the Python tutorial? if 
you can't find it on your own machine. Try reading chapter 9: 'classes' 
with special attention to 9.5 'inheritance'.

If you want coding examples you could look at Python's standard library. 
There are plenty of examples of subclassing. For example, try CGIHTTPServer 
and its associated documentation, htmllib or HTMLParser are other places 
to look. shows an example of 
subclassing the HTMLParser class to parse html.

More information about the Python-list mailing list