Re: [Tutor] cartesian product recursive loop

2006-07-18 Thread Kent Johnson
Gabriel Farrell wrote: >> > Each call to rloop() has its own local variables and its own state. >> > Returning from one call doesn't pop all the way up the stack, it >> > resumes execution at the point of call with the local state restored >> > to what it was before the call. >> > > Okay, this

Re: [Tutor] cartesian product recursive loop

2006-07-18 Thread Gabriel Farrell
On Tue, Jul 18, 2006 at 01:33:27PM -0400, Kent Johnson wrote: > Each call to rloop() has its own local variables and its own state. > Returning from one call doesn't pop all the way up the stack, it > resumes execution at the point of call with the local state restored > to what it was before the c

Re: [Tutor] cartesian product recursive loop

2006-07-18 Thread Kent Johnson
Gabriel Farrell wrote: > In trying to combine a set of lists together, I landed upon > http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/302478 , which > does the job beautifully. The problem is I really want to understand > how it does it, and I can't quite get my brain wrapped around it. >

[Tutor] cartesian product recursive loop

2006-07-18 Thread Gabriel Farrell
In trying to combine a set of lists together, I landed upon http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/302478 , which does the job beautifully. The problem is I really want to understand how it does it, and I can't quite get my brain wrapped around it. I'll try to explain, step by ste