title: When to use class versus dict in python?
body: <p>When considering design, in which cases does it make sense to use class versus dict? Pros &amp; Cons would be useful too.</p>
  
  <p>For example,</p>
  
  <pre><code>class AlbumState:
      """ AlbumState class, tracks photos shown, etc"""
  
      def __init__ (self, album):
          """ album for this object will track state"""
          self.album = album
  
          self.photos_shown = []
          self.photos_notshown = range(album.size())
  </code></pre>
  
  <p>versus</p>
  
  <pre><code>albumstate['album'] = album
  albumstate['photos_shown'] = []
  albumstate['photos_notshown'] = range(album.size())
  </code></pre>