Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #10635
| Date | 2011-07-31 15:34 -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> <4E35A0BB.5010201@gmail.com> <CAMZYqRQ=VWyRAvNEvyuTjq7q-+zX8gLh1OzN514pNdygizz3LQ@mail.gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1700.1312144478.1164.python-list@python.org> (permalink) |
On 2011.07.31 02:51 PM, Chris Rebert wrote: > Less punctuation noise: > QueueItem.x264.avs.filter.fft3d.ffte > vs. > QueueItem.x264['avs']['filter']['fft3d']['ffte'] > > It would also make clear that your sets of "keys" are static (unlike > typical dictionary usage). I see what Thorsten meant by "named tuple" now. I was thinking of a tuple with a name: x = (1,2) Your usage made me look it up and I see that it means the factory function in the collections module. I wanted to make things look like that, but the only way I knew how to do that would've been to a new create blank class and assign values to its __dict__. Named tuples look useful; I'll read the docs and see if that will work. -- 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 | Next — Previous in thread | Next in thread | Find similar | Unroll 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