Re: [Tutor] Instantiate a subClass using an instance of its baseClass

2006-02-13 Thread Kenny Li
Kent:   Overriding the accept() is an excellent idea. It looks more elegant than my original thinking of "total" subclassing. Thanks a lot; I have learned a great deal from you.   Kenny   On 2/13/06, Kent Johnson <[EMAIL PROTECTED]> wrote: Kenny Li wrote:> Yep! I think that is

[Tutor] Fwd: Instantiate a subClass using an instance of its baseClass

2006-02-13 Thread Kenny Li
Sorry, keep forgetting "reply-all"-- Forwarded message --From: Kenny Li <[EMAIL PROTECTED] >Date: Feb 13, 2006 11:00 AMSubject: Re: [Tutor] Instantiate a subClass using an instance of its baseClassTo: Kent Johnson <[EMAIL PROTECTED]> Yep! I think that is what

[Tutor] Fwd: Instantiate a subClass using an instance of its baseClass

2006-02-13 Thread Kenny Li
larifying my intent.  On 2/13/06, Kent Johnson <[EMAIL PROTECTED]> wrote: Kenny Li wrote:> *class B(object):  *> *''' the baseClass '''*> *def __init__(self, arg1, arg2):* > *self.a1=arg1*> *self.a2=arg2*> * *>

[Tutor] Instantiate a subClass using an instance of its baseClass

2006-02-12 Thread Kenny Li
Hi Tutor:   My question is "how to instantiate a subClass using an instance of its baseClass?"   Details below: =   class B(object):      ''' the baseClass '''     def __init__(self, arg1, arg2):     self.a1=arg1     self.a2=arg2   class C(B):     ''' C is subClass of B ''

[Tutor] Looking for a number adding script

2005-04-10 Thread Kenny Li
Hi all, A little while ago, when I tried to pick up Python, I ran into an article that has a script to add up all numbers in a text file (email message, for example). I want to use that script now, but I could not find (recalled) the URL to the article. If you have a point, please let me know. App