Skip to content
This repository was archived by the owner on Jan 13, 2021. It is now read-only.

Commit 26f7c0d

Browse files
committed
Give HTTPHeaderMap useful repr and str.
1 parent 2446bb6 commit 26f7c0d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

hyper/common/headers.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,12 @@ def __eq__(self, other):
203203
def __ne__(self, other):
204204
return self._items != other._items
205205

206+
def __str__(self): # pragma: no cover
207+
return 'HTTPHeaderMap(%s)' % self._items
208+
209+
def __repr__(self): # pragma: no cover
210+
return str(self)
211+
206212

207213
def canonical_form(k, v):
208214
"""

0 commit comments

Comments
 (0)