MCPcopy
hub / github.com/tornadoweb/tornado / __contains__

Method __contains__

tornado/httputil.py:344–350  ·  view source on GitHub ↗
(self, name: object)

Source from the content-addressed store, hash-verified

342 self._as_list[norm_name] = [value]
343
344 def __contains__(self, name: object) -> bool:
345 # This is an important optimization to avoid the expensive concatenation
346 # in __getitem__ when it's not needed.
347 if not isinstance(name, str):
348 return False
349 norm_name = _normalize_header(name)
350 return norm_name in self._as_list
351
352 def __getitem__(self, name: str) -> str:
353 header = _normalize_header(name)

Callers

nothing calls this directly

Calls 1

_normalize_headerFunction · 0.85

Tested by

no test coverage detected