equal
deleted
inserted
replaced
46 def _convert_string_type(self, value): |
46 def _convert_string_type(self, value): |
47 """Convert/check value type.""" |
47 """Convert/check value type.""" |
48 if type(value) is bytes: |
48 if type(value) is bytes: |
49 return value |
49 return value |
50 raise AssertionError( |
50 raise AssertionError( |
51 u"Header names/values must be" |
51 "Header names/values must be" |
52 u" of type bytes (got %s)" % repr(value) |
52 " of type bytes (got %s)" % repr(value) |
53 ) |
53 ) |
54 |
54 |
55 def __len__(self): |
55 def __len__(self): |
56 """Return the total number of headers, including duplicates.""" |
56 """Return the total number of headers, including duplicates.""" |
57 return len(self._headers) |
57 return len(self._headers) |