[Tutor] need advice about a dictionary ({})

Richard D. Moores rdmoores at gmail.com
Sun Sep 11 03:28:40 CEST 2011

On Sat, Sep 10, 2011 at 17:34, Marc Tompkins <marc.tompkins at gmail.com> wrote:
> On Sat, Sep 10, 2011 at 4:18 PM, Richard D. Moores <rdmoores at gmail.com>
> wrote:
>> On Sat, Sep 10, 2011 at 15:32, Alan Gauld <alan.gauld at btinternet.com>
>> wrote:
>> > So you open the file and from that point on treat it exactly like a
>> > dictionary.
>> I'm still a bit shaky about dictionaries.
> That right there is the salient bit.  Using shelve is just like using a
> dictionary; probably that's why you're finding the documentation sparse:
> dictionaries are core Python, so they assume you know how to use them.
> ("First, catch your rabbit...")
> I was about to write an introduction to dictionaries, but I realized it's
> been done, and done better than I could.  I really recommend that you learn
> them; I think that once you do, you'll find that they're a better fit in all
> sorts of places where you've been using lists.  (Speaking from personal
> experience...)

Well, I wrote "a BIT shaky". I sure learned a lot writing my
phone_book.py, with important input from you . And am still pretty
happy with it. And dictionaries seem to be well-covered in some of the
Python books I have.


More information about the Tutor mailing list