Why can't I run this test class?

2009-09-11 Thread Kermit Mei
Dear all, I'm a newbie for python, and I write a program to test how to implement a class: #!/usr/bin/env python class Test: 'My Test class' def __init__(self): self.arg1 = 1 def first(self): return

Re: Why can't I run this test class?

2009-09-11 Thread Chris Rebert
On Fri, Sep 11, 2009 at 12:30 AM, Kermit Mei kermit@gmail.com wrote: Dear all,    I'm a newbie for python, and I write a program to test how to implement a class: #!/usr/bin/env python class Test:    'My Test class'    def __init__(self):        self.arg1 = 1    def first(self):  

Re: Why can't I run this test class?

2009-09-11 Thread Donn
On Friday 11 September 2009 09:30:42 Kermit Mei wrote: Do this: class Test(object): t1 = Test And this: t1 = Test() That makes an instance and runs the __init__ \d -- home: http://otherwise.relics.co.za/ 2D vector animation : https://savannah.nongnu.org/projects/things/ Font manager :

Re: Why can't I run this test class?

2009-09-11 Thread Kermit Mei
On Fri, 2009-09-11 at 00:33 -0700, Chris Rebert wrote: On Fri, Sep 11, 2009 at 12:30 AM, Kermit Mei kermit@gmail.com wrote: Dear all, I'm a newbie for python, and I write a program to test how to implement a class: #!/usr/bin/env python class Test: 'My Test class'

Re: Why can't I run this test class?

2009-09-11 Thread Chris Rebert
On Fri, Sep 11, 2009 at 12:40 AM, Kermit Mei kermit@gmail.com wrote: On Fri, 2009-09-11 at 00:33 -0700, Chris Rebert wrote: On Fri, Sep 11, 2009 at 12:30 AM, Kermit Mei kermit@gmail.com wrote: Dear all,    I'm a newbie for python, and I write a program to test how to implement a

Re: Why can't I run this test class?

2009-09-11 Thread Kermit Mei
On Fri, 2009-09-11 at 00:43 -0700, Chris Rebert wrote: On Fri, Sep 11, 2009 at 12:40 AM, Kermit Mei kermit@gmail.com wrote: On Fri, 2009-09-11 at 00:33 -0700, Chris Rebert wrote: On Fri, Sep 11, 2009 at 12:30 AM, Kermit Mei kermit@gmail.com wrote: Dear all, I'm a newbie for

Re: Why can't I run this test class?

2009-09-11 Thread Ulrich Eckhardt
Kermit Mei wrote: #!/usr/bin/env python class Test: 'My Test class' def __init__(self): self.arg1 = 1 def first(self): return self.arg1 t1 = Test 't1' is now an alternative name for 'Test'. What you wanted instead was to instantiate 'Test', which you do

Re: Why can't I run this test class?

2009-09-11 Thread Benjamin Kaplan
On Fri, Sep 11, 2009 at 4:01 AM, Kermit Mei kermit@gmail.com wrote: On Fri, 2009-09-11 at 00:43 -0700, Chris Rebert wrote: On Fri, Sep 11, 2009 at 12:40 AM, Kermit Mei kermit@gmail.com wrote: On Fri, 2009-09-11 at 00:33 -0700, Chris Rebert wrote: On Fri, Sep 11, 2009 at 12:30