Re: help in understanding the stackless code

2015-06-18 Thread Laura Creighton
You need to send your message over here. http://www.stackless.com/mailman/listinfo/stackless I think I know the answer, from my work in duplicating stackless for greenlets in pypy. But that's the answer in theory. In practice, you need real stackless users. Laura -- https://mail.python.org/ma

Re: help in understanding the stackless code

2015-06-18 Thread ravi
yes It has instance of both Reporter and Switch. moreover I could not get why instance "reporter" is passed to class Switch as a parameter ? > > reporter = Reporter() > > switch = Switch(0,reporter) > > switch(1) thanks On Thursday, June 18, 2015 at 5:45:08 PM UTC+5:30, MRAB w

Re: help in understanding the stackless code

2015-06-18 Thread MRAB
On 2015-06-18 08:41, ravi wrote: hi, I am new to python and need to know why the calling of switch(1) invokes the function "listen" twice in the below program? import stackless class EventHandler: def __init__(self,*outputs): if outputs==None: self.outputs=[]

help in understanding the stackless code

2015-06-18 Thread ravi
hi, I am new to python and need to know why the calling of switch(1) invokes the function "listen" twice in the below program? import stackless class EventHandler: def __init__(self,*outputs): if outputs==None: self.outputs=[] else: self.outputs=list