Creating subclassess (newbie)
Duncan Booth
me at privacy.net
Mon Jun 21 11:02:39 EDT 2004
Adam <adamc at linuxmail.org> 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? http://docs.python.org/tut 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.
http://docs.python.org/lib/htmlparser-example.html shows an example of
subclassing the HTMLParser class to parse html.
More information about the Python-list
mailing list