[Stackless] Microthreads from class methods

Gordon McMillan gmcm at hypernet.com
Sun Sep 2 18:41:09 CEST 2001


Jacob Gorm Hansen wrote:
> 
> is there a reason why (in SLP 2.0)
> 
> The following seems not to work:
> 
> class C:
>  def t1():
>   pass

That doesn't work period.

You need:
class C:
  def t1(self):
     pass

 
> uthread.new(C.t1)

and 
uthread.new(C().t1()) # needs to be an instance



- Gordon
_______________________________________________
Stackless mailing list
Stackless at starship.python.net
http://starship.python.net/mailman/listinfo/stackless



More information about the Stackless mailing list