On Sunday 05 September 2010, it occurred to Roy Smith to exclaim: > I'm using httplib, and want to get the Location header from the > response. The getheaders() method gives you back a list of (name, > value) tuples. It would be a lot more convenient if it gave you back a > dict, but it is what it is.
It may not be a dict, but you can always make it one: >>> L = [('a',1), ('b', 42), ('c', 0)] >>> dict(L) {'a': 1, 'c': 0, 'b': 42} >>> -- http://mail.python.org/mailman/listinfo/python-list