Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #10628

Re: Deeply nested dictionaries - should I look into a database or am I just doing it wrong?

Date 2011-07-31 13:36 -0500
From Andrew Berg <bahamutzero8825@gmail.com>
Subject Re: Deeply nested dictionaries - should I look into a database or am I just doing it wrong?
References <CAJ+TeoevaLW+PxixdLj9+tDkMZcGoxnp51K3PKWHQx4bbZt4Mg@mail.gmail.com> <mailman.1684.1312081856.1164.python-list@python.org> <MPG.289f25a5bb16d26998983f@news.individual.de>
Newsgroups comp.lang.python
Message-ID <mailman.1695.1312137417.1164.python-list@python.org> (permalink)

Show all headers | View raw


On 2011.07.31 02:41 AM, Thorsten Kampe wrote:
> The "QueueItem.x264['avs']['filter']['fft3d']['ffte'])" example does not 
> look right. Especially the mix of "." and "[]" references. Actually, 
> dictionaries in a dictionary don't look right to me either.
QueueItem is the class; x264 is a dictionary.

> The design of your data structure won't change. I would think that your 
> program already mimicks it by nested class statements so you're 
> duplicating the already existing class structure via dictionaries in 
> order to have it available in the main class.
Huh? I only have no nested class statements.

> Another approach would be named tuples instead of dictionaries or flat 
> SQL tables.
What would the advantage of that be?

-- 
CPython 3.2.1 | Windows NT 6.1.7601.17592 | Thunderbird 5.0
PGP/GPG Public Key ID: 0xF88E034060A78FCB

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: Deeply nested dictionaries - should I look into a database or am I just doing it wrong? Andrew Berg <bahamutzero8825@gmail.com> - 2011-07-30 22:10 -0500
  Re: Deeply nested dictionaries - should I look into a database or   am I just doing it wrong? Thorsten Kampe <thorsten@thorstenkampe.de> - 2011-07-31 09:41 +0200
    Re: Deeply nested dictionaries - should I look into a database or am I just doing it wrong? Andrew Berg <bahamutzero8825@gmail.com> - 2011-07-31 13:36 -0500
      Re: Deeply nested dictionaries - should I look into a database or   am I just doing it wrong? Thorsten Kampe <thorsten@thorstenkampe.de> - 2011-07-31 22:04 +0200
        Re: Deeply nested dictionaries - should I look into a database or am I just doing it wrong? Philip Semanchuk <philip@semanchuk.com> - 2011-07-31 16:53 -0400
        Re: Deeply nested dictionaries - should I look into a database or am I just doing it wrong? Andrew Berg <bahamutzero8825@gmail.com> - 2011-07-31 17:26 -0500
          Re: Deeply nested dictionaries - should I look into a database or   am I just doing it wrong? Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2011-08-01 18:29 +1200
    Re: Deeply nested dictionaries - should I look into a database or am I just doing it wrong? Chris Rebert <clp2@rebertia.com> - 2011-07-31 12:51 -0700
    Re: Deeply nested dictionaries - should I look into a database or am I just doing it wrong? Andrew Berg <bahamutzero8825@gmail.com> - 2011-07-31 15:34 -0500
      Re: Deeply nested dictionaries - should I look into a database or am I just doing it wrong? BlueBird <phil@freehackers.org> - 2011-08-02 02:17 -0700

csiph-web