title: Best Practices for Save Files - a python pickle use case
body: <p>I'm a non-programmer who got into simple python programming for automation of GIS-related tasks at work. I've found I really enjoy it, however, and have be "expanding" my skills outside of work.</p>
  
  <p>I'm currently playing with using the Pickle module for saving class instances, and realized that I have a few options for structuring that save data. My question relates to which option is the "better" or more "acceptable / best practice" option, or if there is a better option all-together.</p>
  
  <p>I'll use a "playstation-esque" example, just for kicks:</p>
  
  <p>There are multiple users. Each user has a set of trophies for a particular game. Each user might also have multiple Player profiles for a particular game, and each of those characters can have multiple saved instances of gameplay.</p>
  
  <p>So when someone logs on, they choose which user they are, from that saved list of user objects (or create a new one - but for now I will be ignoring the create new scenarios). Depending on which user you are logged in as, the appropriate trophies object can get loaded from the save file, as well as any Player profiles associated with that user. When the user goes to load a saved game, they would chose the appropriate Player profile, and the appropriate saved game info assotiated with that character could be listed. The user would chose the save they want, and the game data would be loaded.</p>
  
  <p>The way I see it, I have a few options:</p>
  
  <p>1) Seperate the save files based on class. Ex:</p>
  
  <pre><code>A) "users" - this could contain a list of the User() objects
  B) "&lt;username&gt;_trophies" - this could contain a list of the Trophy() objects assotiated with the user indicated in the filename
  C) "&lt;username&gt;_characters" - this could contain a list of the Player() objects assotiated with the user indicated in the filename
  D) "&lt;username&gt;_&lt;charactername&gt;_save&lt;#&gt;" - this could contain a save of the game info (probably as a dictionary with various info) assotiated with the username and charactername indicated in the filename
  </code></pre>
  
  <p>With this setup, each file could be unpickled as needed, so that the trophy info need never be loaded if the user never choses to look at their trophies.</p>
  
  <p>However, I wonder if this is breaking it up too much and creating too many files. Would I be better off with this option?:</p>
  
  <p>2) Have one comprehensive save file with all the info in dictionary form. For ex:</p>
  
  <pre><code>{User:[[Trophy,Trophy,Trophy], {Character: [(game info),
                                              (game info),
                                              (game info)];
                                  Character:  [(game info),
                                              (game info),
                                              (game info)]}];
   User:[[Trophy,Trophy,Trophy], {Character: [(game info),
                                              (game info),
                                              (game info)];
                                  Character:  [(game info),
                                               (game info),
                                               (game info)]}]}
  </code></pre>
  
  <p>So which of these is "better" ? Are either ok? Neither?</p>
  
  <p>Thanks for any and all help / opinions!</p>