Re: In Python 3, how to append a nested dictionary to a shelve file with the added difficulty of using a for loop?

2015-12-22 Thread Peter Otten
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):

In Python 3, how to append a nested dictionary to a shelve file with the added difficulty of using a for loop?

2015-12-21 Thread Aaron
Hello, I am trying to figure out how to populate a shelve file with a nested dictionary. These are my requirements: -Create shelve file called people.db -Append the shelve file with new people (person_1, person_2, etc.). -Use a for loop to iterate through 'attributes' so that I do not need to

In Python 3, how to append a nested dictionary to a shelve file with the added difficulty of using a for loop?

2015-12-21 Thread Aaron Christensen
Hello, I am trying to figure out how to populate a shelve file with a nested dictionary. These are my requirements: -Create shelve file called people.db -Append the shelve file with new people (person_1, person_2, etc.). -Use a for loop to iterate through 'attributes' so that I do not need to

Re: In Python 3, how to append a nested dictionary to a shelve file with the added difficulty of using a for loop?

2015-12-21 Thread Peter Otten
Aaron Christensen wrote: > Hello, > > I am trying to figure out how to populate a shelve file with a nested > dictionary. > > These are my requirements: > > -Create shelve file called people.db > -Append the shelve file with new people (person_1, person_2, etc.). > -Use a for loop to iterate

Re: In Python 3, how to append a nested dictionary to a shelve file with the added difficulty of using a for loop?

2015-12-21 Thread Aaron Christensen
Hi Peter, 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. Thanks! Aaron On Mon, Dec 21, 2015 at 7:23 PM, Peter Otten <__pete...@web.de> wrote: > Aaron