MCPcopy Index your code
hub / github.com/python/cpython / __setitem__

Method __setitem__

Lib/http/cookies.py:302–308  ·  view source on GitHub ↗
(self, K, V)

Source from the content-addressed store, hash-verified

300 return self._coded_value
301
302 def __setitem__(self, K, V):
303 K = K.lower()
304 if not K in self._reserved:
305 raise CookieError("Invalid attribute %r" % (K,))
306 if _has_control_character(K, V):
307 raise CookieError(f"Control characters are not allowed in cookies {K!r} {V!r}")
308 dict.__setitem__(self, K, V)
309
310 def setdefault(self, key, val=None):
311 key = key.lower()

Callers 2

__setMethod · 0.45
__setitem__Method · 0.45

Calls 3

CookieErrorClass · 0.85
_has_control_characterFunction · 0.85
lowerMethod · 0.45

Tested by

no test coverage detected