Re: Sending changed parameters into nested generators

2011-01-21 Thread John O'Hagan
On Fri, 21 Jan 2011, cbrown wrote: > On Nov 12, 10:52 pm, "John O'Hagan" wrote: > > On Sat, 13 Nov 2010, Steven D'Aprano wrote: > > > On Fri, 12 Nov 2010 09:47:26 +, John O'Hagan wrote: > > > > I have a generator function which takes as arguments another > > > > generator and a dictionary of o

Re: Sending changed parameters into nested generators

2010-11-18 Thread cbr...@cbrownsystems.com
On Nov 12, 10:52 pm, "John O'Hagan" wrote: > On Sat, 13 Nov 2010, Steven D'Aprano wrote: > > On Fri, 12 Nov 2010 09:47:26 +, John O'Hagan wrote: > > > I have a generator function which takes as arguments another generator > > > and a dictionary of other generators like this: > > > > def modgen

Re: Sending changed parameters into nested generators

2010-11-12 Thread John O'Hagan
On Sat, 13 Nov 2010, Steven D'Aprano wrote: > On Fri, 12 Nov 2010 09:47:26 +, John O'Hagan wrote: > > I have a generator function which takes as arguments another generator > > and a dictionary of other generators like this: > > > > def modgen(gen, gendict): > > for item in gen(): > >

Re: Sending changed parameters into nested generators

2010-11-12 Thread Steven D'Aprano
On Fri, 12 Nov 2010 09:47:26 +, John O'Hagan wrote: > I have a generator function which takes as arguments another generator > and a dictionary of other generators like this: > > def modgen(gen, gendict): > for item in gen(): > for k, v in gendict: > do_something_calle

Re: Sending changed parameters into nested generators

2010-11-12 Thread John O'Hagan
On Fri, 12 Nov 2010, Ian wrote: > On Nov 12, 2:47 am, "John O'Hagan" wrote: > > I have tried using a deep update function on the original nested > > dictionary, but this only works if I change the contents of a list, not > > if I want to, say, change a node from a list to a dictionary or vice > >

Re: Sending changed parameters into nested generators

2010-11-12 Thread Arnaud Delobelle
"John O'Hagan" writes: > I have a generator function which takes as arguments another generator and a > dictionary of other generators like this: > > def modgen(gen, gendict): > for item in gen(): > for k, v in gendict: > do_something_called_k(item, v.next()) > yiel

Re: Sending changed parameters into nested generators

2010-11-12 Thread Ian
On Nov 12, 2:47 am, "John O'Hagan" wrote: > I have tried using a deep update function on the original nested dictionary, > but this only works if I  change the contents of a list, not if I want to, > say, change a node from a list to a dictionary or vice versa, because in that > case I'm not opera