Help with a utility class and having a method call another method from within
Ulrich Petri
ulope at gmx.de
Sat Sep 6 11:35:41 EDT 2003
"Ian" <2ianbutt at rogers.com> schrieb im Newsbeitrag
news:37500ed8.0309051159.1eef42c5 at posting.google.com...
>
>
> in file-->SampleClass.py
>
> class SampleClassd :
>
> def __init__(self) :
> self.test = 'a'
>
> def testBob1(self, a) :
> if a == 1:
> return True
> else:
> return False
>
> def testBob2(self, a) :
> return SampleClassd().testBob1(a)
How about:
def testBob2(self,a):
return self.testBob1(a)
HTH
Cu Ulrich
More information about the Python-list
mailing list