Re: cPickle segfault with nested dicts in threaded env

2010-09-09 Thread Kenneth Dombrowski
On Wed, Sep 8, 2010 at 6:55 PM, Paul Rubin wrote: > Carl Banks writes: >> Since Python 2.7 is released, Python 2.5 is no longer accepting bug >> fixes, only security fixes.  So be aware. > > Segfaults should be treated as security holes unless there's convincing > reasons that no exploit is possi

Re: cPickle segfault with nested dicts in threaded env

2010-09-08 Thread Aahz
In article , Thomas Jollans wrote: > >Also, Python 2.5 is frightfully old. [...] "Frightfully"??? I'm sure plenty of people are still using Python 2.3 in production environments (certainly my last job did as of 1.5 years ago, and I would be mildly surprised if they upgraded by now). -- Aahz (

Re: cPickle segfault with nested dicts in threaded env

2010-09-08 Thread Paul Rubin
Carl Banks writes: > Since Python 2.7 is released, Python 2.5 is no longer accepting bug > fixes, only security fixes. So be aware. Segfaults should be treated as security holes unless there's convincing reasons that no exploit is possible. So the bug should be reported against 2.5 as well as l

Re: cPickle segfault with nested dicts in threaded env

2010-09-08 Thread Carl Banks
On Sep 8, 11:58 am, Kenneth Dombrowski wrote: > Hi all, > > Before creating an issue @ bugs.python.org I wanted to run the > following by everyone > > We are having a difficult time with what looks like a cPickle issue > when given a data structure containing >15 nested dictionaries, but > only wh

Re: cPickle segfault with nested dicts in threaded env

2010-09-08 Thread Thomas Jollans
On Wednesday 08 September 2010, it occurred to Kenneth Dombrowski to exclaim: > Environment is FreeBSD 8, Python 2.5.5 Which architecture? Also, Python 2.5 is frightfully old. There's not really any problem with still using it, but nobody's maintaining it upstream, so don't bother reporting a b

cPickle segfault with nested dicts in threaded env

2010-09-08 Thread Kenneth Dombrowski
Hi all, Before creating an issue @ bugs.python.org I wanted to run the following by everyone We are having a difficult time with what looks like a cPickle issue when given a data structure containing >15 nested dictionaries, but only when threading is involved Environment is FreeBSD 8, Python 2.

Re: Nested Dicts

2009-12-05 Thread Victor Subervi
On Sat, Dec 5, 2009 at 12:39 PM, Carsten Haese wrote: > Victor Subervi wrote: > > Of course I knew about those indentation errors > > That may be so, but you cleverly disguised this fact by saying the exact > opposite. > I will try not to make such assumptions in the future. Forgive me for leadin

Re: Nested Dicts

2009-12-05 Thread Carsten Haese
Victor Subervi wrote: > Of course I knew about those indentation errors That may be so, but you cleverly disguised this fact by saying the exact opposite. -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

Re: Nested Dicts

2009-12-05 Thread Victor Subervi
On Sat, Dec 5, 2009 at 12:01 PM, Carsten Haese wrote: > Victor Subervi wrote: > d = {'cat': {'one':'two'}} > for a, b in d: > > ... > > File "", line 2 > > > > ^ > > IndentationError: expected an indented block > d = {'cat': {}} > for a, b in d: > > ... > > File "", lin

Re: Nested Dicts

2009-12-05 Thread Carsten Haese
Victor Subervi wrote: d = {'cat': {'one':'two'}} for a, b in d: > ... > File "", line 2 > > ^ > IndentationError: expected an indented block d = {'cat': {}} for a, b in d: > ... > File "", line 2 > > ^ > IndentationError: expected an indented block > > So app

Re: Nested Dicts

2009-12-05 Thread MRAB
Victor Subervi wrote: Hi; I have the following error: /var/www/html/angrynates.com/cart/catTree.py in getChildren(levelDict={'cat3': {}}, level=0) 23 if level > MAXLEVEL: 24 return #possibly the data has a cycle/loop 25 for (nm, dt) i

Re: Nested Dicts

2009-12-05 Thread D'Arcy J.M. Cain
On Sat, 5 Dec 2009 10:52:10 -0500 Victor Subervi wrote: > Hi; > I have the following error: > > /var/www/html/angrynates.com/cart/catTree.py in > getChildren(levelDict={'cat3': {}}, level=0) >23 if level > MAXLEVEL: >24 return #possibly the data has a cycle/loop >25 for (nm,

Nested Dicts

2009-12-05 Thread Victor Subervi
Hi; I have the following error: /var/www/html/angrynates.com/cart/catTree.py in getChildren(levelDict={'cat3': {}}, level=0) 23 if level > MAXLEVEL: 24 return #possibly the data has a cycle/loop 25 for (nm, dt) in levelDict: ### ERROR HERE 26 cursor.execute('''select c.na

Re: permuting over nested dicts?

2007-11-08 Thread Boris Borcic
'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. And d['a']['x'] can be either 1 or 2 or >&

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
1,12]}} > This can be read as a dict of possibilities: The entities 'a' and 'b' have > the parameters 'x' and 'y', each. And d['a']['x'] can be either 1 or 2 or > 3. Does anybody know a convenient (and fast) way to permute over all

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
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'

Re: permuting over nested dicts?

2007-11-01 Thread Anand
: {'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. And d['a']['x'] can be either 1 or 2 or > 3. Does anybody know

Re: permuting over nested dicts?

2007-10-31 Thread Paddy
: {'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. And d['a']['x'] can be either 1 or 2 or > 3. Does anybody know

permuting over nested dicts?

2007-10-31 Thread Christian Meesters
e entities 'a' and 'b' have the parameters 'x' and 'y', each. And d['a']['x'] can be either 1 or 2 or 3. Does anybody know a convenient (and fast) way to permute over all possible nested dicts like {'a': {'x':1, '