Re: a beginner, beginners question

2008-03-19 Thread klaus
On Wed, 19 Mar 2008 05:57:04 -0500, Tim Chase wrote: >> class example: >> def __init__(self, foo, bar): >> self.foo = foo >> self.bar = bar >> >> def method(self): >> print "method ... :" >> print self.foo >> print self.bar >> >> if __name__ == "__

Re: a beginner, beginners question

2008-03-19 Thread John Machin
On Mar 19, 9:40 pm, klaus <[EMAIL PROTECTED]> wrote: > Hello, > > I'm trying to learn python programming and so far so good. However when > trying to master the oop side I ran into a small problem. > > I think I've done everything ok as outlined below. But I just don't > understand why the `method'

Re: a beginner, beginners question

2008-03-19 Thread Tim Chase
> class example: > def __init__(self, foo, bar): > self.foo = foo > self.bar = bar > > def method(self): > print "method ... :" > print self.foo > print self.bar > > if __name__ == "__main__": > obj = example This makes "obj" a synonym for "e

a beginner, beginners question

2008-03-19 Thread klaus
Hello, I'm trying to learn python programming and so far so good. However when trying to master the oop side I ran into a small problem. I think I've done everything ok as outlined below. But I just don't understand why the `method' of `class' example isn't printing any of the variables that I