Re: permuting over nested dicts?

2007-11-08 Thread Boris Borcic
Boris Borcic wrote: > Christian Meesters wrote: >> Hoi, >> >> I have the following data structure (of variable size actually, to make >> things simple, just that one): >> d = {'a': {'x':[1,2,3], 'y':[4,5,6]}, >> 'b': {'x':[7,8,9], 'y':[10,11,12]}} >> This can be read as a dict of possibilities

Re: permuting over nested dicts?

2007-11-06 Thread Paddy
On Nov 1, 10:51 am, Christian Meesters <[EMAIL PROTECTED]> wrote: > Thanks everyone, > > I knew there must be a snippet somewhere, just couldn't find one! (Just for > the sake of completeness: Order doesn't matter and I hope that with my data > I won't reach the recursion depth limit.) > > Christia

Re: permuting over nested dicts?

2007-11-01 Thread Boris Borcic
Christian Meesters wrote: > Hoi, > > I have the following data structure (of variable size actually, to make > things simple, just that one): > d = {'a': {'x':[1,2,3], 'y':[4,5,6]}, > 'b': {'x':[7,8,9], 'y':[10,11,12]}} > This can be read as a dict of possibilities: The entities 'a' and 'b' h

Re: permuting over nested dicts?

2007-11-01 Thread Christian Meesters
Thanks everyone, I knew there must be a snippet somewhere, just couldn't find one! (Just for the sake of completeness: Order doesn't matter and I hope that with my data I won't reach the recursion depth limit.) Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: permuting over nested dicts?

2007-11-01 Thread Ant
On Nov 1, 9:12 am, Anand <[EMAIL PROTECTED]> wrote: ... > This code works for dictionaries of any nested level. At least up to the max recursion depth. -- Ant. -- http://mail.python.org/mailman/listinfo/python-list

Re: permuting over nested dicts?

2007-11-01 Thread Anand
On Nov 1, 2:12 pm, Anand <[EMAIL PROTECTED]> wrote: > On Oct 31, 10:21 pm, Christian Meesters <[EMAIL PROTECTED]> wrote: > > > > > Hoi, > > > I have the following data structure (of variable size actually, to make > > things simple, just that one): > > d = {'a': {'x':[1,2,3], 'y':[4,5,6]}, > >

Re: permuting over nested dicts?

2007-11-01 Thread Anand
On Oct 31, 10:21 pm, Christian Meesters <[EMAIL PROTECTED]> wrote: > Hoi, > > I have the following data structure (of variable size actually, to make > things simple, just that one): > d = {'a': {'x':[1,2,3], 'y':[4,5,6]}, > 'b': {'x':[7,8,9], 'y':[10,11,12]}} > This can be read as a dict of p

Re: permuting over nested dicts?

2007-10-31 Thread Paddy
On Oct 31, 5:21 pm, Christian Meesters <[EMAIL PROTECTED]> wrote: > Hoi, > > I have the following data structure (of variable size actually, to make > things simple, just that one): > d = {'a': {'x':[1,2,3], 'y':[4,5,6]}, > 'b': {'x':[7,8,9], 'y':[10,11,12]}} > This can be read as a dict of po

permuting over nested dicts?

2007-10-31 Thread Christian Meesters
Hoi, I have the following data structure (of variable size actually, to make things simple, just that one): d = {'a': {'x':[1,2,3], 'y':[4,5,6]}, 'b': {'x':[7,8,9], 'y':[10,11,12]}} This can be read as a dict of possibilities: The entities 'a' and 'b' have the parameters 'x' and 'y', each. An