[Stackless] 1. Stackless Error (Carl, Andrew F (AS))

Christian Tismer tismer at stackless.com
Mon Mar 15 21:37:32 CET 2010


On 3/15/10 7:14 PM, Carl, Andrew F (AS) wrote:
> Andrew / Christian,
>
> Yes, stackless.run had been called, just not included in the email.
> "self" is just the current class instance, really does not matter. It
> appears that the important point is the definition of what can
> constitute a "callable". (i.e. function, class instance...?).
A callable thing in Python is anything that you can call by writing
thing(). It is able to be called, a call-able. :-)

Usually, a callable object has a __call__ method. But I think this
was only true in the modern versions of Python.
But the rule above was and is always true, and there is a boolean
function callable(thing) which tells you if thing is callable, I.e.
you can do a thing() call.

() means any argument list, not further specified. If thing is
happy with the supplied argument list is a different question.

Well, and the question about self:

	Stackless.tasklet( self.r_run(args) )

was in fact relevant, becauseself.r_run(args) could have
returned a callable object itself!

cheers - chris

--
Christian Tismer             :^)<mailto:tismer at stackless.com>
tismerysoft GmbH             :     Have a break! Take a ride on Python's
Johannes-Niemeyer-Weg 9A     :    *Starship* http://starship.python.net/
14109 Berlin                 :     PGP key ->  http://wwwkeys.pgp.net/
work +49 30 802 86 56  mobile +49 173 24 18 776  fax +49 30 80 90 57 05
PGP 0x57F3BF04       9064 F4E1 D754 C2FF 1619  305B C09C 5A3B 57F3 BF04
       whom do you want to sponsor today?   http://www.stackless.com/




More information about the Stackless mailing list