On 4/12/06, John Mettraux <[EMAIL PROTECTED]> wrote:

>  def use (self, workitem):
>          print '+++ Dequeue_pyya_agent.use()'
>          print 'second line in use()'
>          dummyFunc('testing function call')
>
>  def dummyFunc(some_string):
>          print some_string
>
>  The first two lines are printed (to the log/console), but not the third.
>  It may be that I'm doing something wrong in Python.

The first method is an instance method, the second one is a class
method, Python distinguishes class from static methods IIRC.

You could perhaps try to

>  def dummyFunc (self, some_string):
>          print some_string

and
>          self.dummyFunc ('testing function call')

 Sorry, I forgot to specify that I have tried both approaches (calling the instance method via self. and the class method in my original example) and neither have worked.  But now I realize that I was omitting the 'self' parameter in the function definition itself and that fixes the problem.

Thanks!

Tony

Reply via email to