Aaron Christensen wrote:

> Thanks for the response!  Several things you stated definitely got me
> thinking.  I really appreciate the response.  I used what you said and I
> am able to accomplish what I needed.

Perhaps it becomes clearer when you write two helper functions

def read_record(key):
    return db[key]

def write_record(key, value):
    db[key] = value

Changing a person's data then becomes

person_data = read_record("person_1")
person_data["age"] = 123
write_record("person_1", person_data)

Also, I was mostly paraphrasing

>>> help(shelve)

so you might read that, too.

-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to