I am really confused as to why Python acts in a particular way.
Here is an example: I have a dictionary called "copy". (It is a copy of an HttpRequest.POST in django.)
Here is a debug session (with added line numbers):
1 (Pdb) copy
2 <QueryDict: {u'text': [u'test'], u'otherId': [u'60002'], u'cmd': [u'cA'], u'id':
3 [u'15']}>
4 (Pdb) copy['text']
5 u'test'
6 (Pdb) copy.pop('text')
7 [u'test']
My problem is that in the dictionary it looks like the values are all lists (they come from django that way.) When I access an element as in line 4 I get it as a value rather than a list, but when I access it with pop I get it as a list again.
I am really confused by that. Can anyone help?