Re: Better dict of dicts

2007-04-21 Thread Bruno Desthuilliers
Bill Jackson a écrit : > I have a dictionary of dictionaries where the keys are typically very > long tuples and repeated in each inner dictionary. The dictionary > representation is nice because it handles sparseness well...and it is > nice to be able to look up values based on a string rather

Re: Better dict of dicts

2007-04-19 Thread Martin v. Löwis
> Now suppose there is little overlap between the keys for the outer > dictionary and the inner dictionaries...but still much overlap between > the various inner dictionaries. Then, there is no point in using an > intern function for the outer dictionary, but still a benefit for the > inner dictio

Re: Better dict of dicts

2007-04-19 Thread DillonCo
On Thursday 19 April 2007, Paddy wrote: > Martins earlier local_intern function would work for tuples as well as > strings. It certainly would. I had written that class, though, primarily to offer a performance improvement in the __eq__ and perhaps __hash__ methods. However, I ended up being r

Re: Better dict of dicts

2007-04-19 Thread Paddy
On Apr 20, 1:38 am, DillonCo <[EMAIL PROTECTED]> wrote: > On Thursday 19 April 2007, Bill Jackson wrote: > > > Martin v. Löwis wrote the following on 04/19/2007 02:43 PM: > > > Bill Jackson schrieb: > > >> I have a dictionary of dictionaries where the keys are typically very > > >> long tuples and

Re: Better dict of dicts

2007-04-19 Thread DillonCo
On Thursday 19 April 2007, Bill Jackson wrote: > Martin v. Löwis wrote the following on 04/19/2007 02:43 PM: > > Bill Jackson schrieb: > >> I have a dictionary of dictionaries where the keys are typically very > >> long tuples and repeated in each inner dictionary. > > > > What I don't understand h

Re: Better dict of dicts

2007-04-19 Thread Steven D'Aprano
On Thu, 19 Apr 2007 17:40:27 -0400, John Bauman wrote: > Adam Atlas wrote: >> On Apr 19, 5:24 pm, Bill Jackson <[EMAIL PROTECTED]> wrote: >>> I have a dictionary of dictionaries where the keys are typically very >>> long tuples and repeated in each inner dictionary. The dictionary >>> representat

Re: Better dict of dicts

2007-04-19 Thread Bill Jackson
Martin v. Löwis wrote the following on 04/19/2007 02:43 PM: > Bill Jackson schrieb: >> I have a dictionary of dictionaries where the keys are typically very >> long tuples and repeated in each inner dictionary. > > What I don't understand here: you say the keys are tuples, yet later, > you show t

Re: Better dict of dicts

2007-04-19 Thread Larry Bates
John Bauman wrote: > Adam Atlas wrote: >> On Apr 19, 5:24 pm, Bill Jackson <[EMAIL PROTECTED]> wrote: >>> I have a dictionary of dictionaries where the keys are typically very >>> long tuples and repeated in each inner dictionary. The dictionary >>> representation is nice because it handles sparse

Re: Better dict of dicts

2007-04-19 Thread DillonCo
On Thursday 19 April 2007, Bill Jackson wrote: > I have a dictionary of dictionaries where the keys are typically very > long tuples and repeated in each inner dictionary. The dictionary > representation is nice because it handles sparseness well...and it is > nice to be able to look up values bas

Re: Better dict of dicts

2007-04-19 Thread Martin v. Löwis
Bill Jackson schrieb: > I have a dictionary of dictionaries where the keys are typically very > long tuples and repeated in each inner dictionary. What I don't understand here: you say the keys are tuples, yet later, you show that the keys are strings. Which one is it? > The dictionary > represe

Re: Better dict of dicts

2007-04-19 Thread John Bauman
Adam Atlas wrote: > On Apr 19, 5:24 pm, Bill Jackson <[EMAIL PROTECTED]> wrote: >> I have a dictionary of dictionaries where the keys are typically very >> long tuples and repeated in each inner dictionary. The dictionary >> representation is nice because it handles sparseness well...and it is >>

Re: Better dict of dicts

2007-04-19 Thread Adam Atlas
On Apr 19, 5:24 pm, Bill Jackson <[EMAIL PROTECTED]> wrote: > I have a dictionary of dictionaries where the keys are typically very > long tuples and repeated in each inner dictionary. The dictionary > representation is nice because it handles sparseness well...and it is > nice to be able to look