Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
This commit is contained in:
2018-03-15 16:37:04 -04:00
parent b115fb7525
commit eb37c39c66
+7 -2
View File
@@ -196,11 +196,16 @@ class HTTPHeaderDict(CaseInsensitiveDict):
else:
self._extend(ik, tuple(iv))
def __repr__(self):
@property
def _as_dict(self):
"""A dictionary representation of the HTTPHeaderDict."""
d = {}
for k, vals in self._store.values():
d[k] = vals[0] if len(vals) == 1 else vals
return repr(d)
return d
def __repr__(self):
return repr(self._as_dict)
class LookupDict(dict):