Re: How to keep a function as a generator function when the yield operator is moved into its sub-functions??

2009-07-15 Thread weafon
Hi DaveA, Thank for your responses even though my problem has been solved based on Miles' suggestion. I am writing programs by using the SimPy library, which is a discrete-event simulator library. Below is my actual code segment class RAID(Process): def ReqServ(self):

Re: How to keep a function as a generator function when the yield operator is moved into its sub-functions??

2009-07-14 Thread Dave Angel
weafon wrote: div class=moz-text-flowed style=font-family: -moz-fixedHi guys, I have a question about the usage of yield. As shown in the below example, in general, if there is a code segment commonly used by two or more functions, we may isolate the segment into a function and then call it