[Tutor] OO approach
Mon, 25 Feb 2002 10:42:10 -0800 (PST)
On Sun, 24 Feb 2002, Prahlad Vaidyanathan wrote:
> I recently wrote a script to extract the urls in the news emails sent by
> 'The Register', and mail them to me. Initially, I just had functions to
> do the following :
> - read the file, and extract the urls matching a regex
> - get the urls
> - mail the urls to me with the description in the subject line
> But, I soon realised I could do this to extract the URLs from the 'Linux
> Journal' weekly announcements as well. So I made a class called
> 'mailURL', and added sub-classes for 'Register' and 'LJNews'.
Can you show us the mailURL base class? Perhaps it's possible to avoid
inheritance altogether by making the parent class general enough to handle
Talk to you later!