(self, headers: ValidHTTPHeaderSource | None = None, **kwargs: str)
| 238 | _container: typing.MutableMapping[str, list[str]] |
| 239 | |
| 240 | def __init__(self, headers: ValidHTTPHeaderSource | None = None, **kwargs: str): |
| 241 | super().__init__() |
| 242 | self._container = {} # 'dict' is insert-ordered |
| 243 | if headers is not None: |
| 244 | if isinstance(headers, HTTPHeaderDict): |
| 245 | self._copy_from(headers) |
| 246 | else: |
| 247 | self.extend(headers) |
| 248 | if kwargs: |
| 249 | self.extend(kwargs) |
| 250 | |
| 251 | def __setitem__(self, key: str, val: str) -> None: |
| 252 | # avoid a bytes/str comparison by decoding before httplib |
no test coverage detected