title: Modifying Dictionary in Django Session Does Not Modify Session
body: <p>I am storing dictionaries in my session referenced by a string key:</p>
  
  <pre><code>&gt;&gt;&gt; request.session['my_dict'] = {'a': 1, 'b': 2, 'c': 3}
  </code></pre>
  
  <p>The problem I encountered was that when I modified the dictionary directly, the value would not be changed during the next request:</p>
  
  <pre><code>&gt;&gt;&gt; request.session['my_dict'].pop('c')
  3
  &gt;&gt;&gt; request.session.has_key('c')
  False
  # looks okay...
  ...
  # Next request
  &gt;&gt;&gt; request.session.has_key('c')
  True
  # what gives!
  </code></pre>