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

Method update

Lib/http/cookies.py:334–344  ·  view source on GitHub ↗
(self, values)

Source from the content-addressed store, hash-verified

332 return morsel
333
334 def update(self, values):
335 data = {}
336 for key, val in dict(values).items():
337 key = key.lower()
338 if key not in self._reserved:
339 raise CookieError("Invalid attribute %r" % (key,))
340 if _has_control_character(key, val):
341 raise CookieError("Control characters are not allowed in "
342 f"cookies {key!r} {val!r}")
343 data[key] = val
344 dict.update(self, data)
345
346 def __ior__(self, values):
347 self.update(values)

Callers 15

__ior__Method · 0.95
test_eqMethod · 0.95
test_copyMethod · 0.95
test_setdefaultMethod · 0.95
test_updateMethod · 0.95
test_pickleMethod · 0.95
test_reprMethod · 0.95
cp855.pyFile · 0.45
cp857.pyFile · 0.45
cp437.pyFile · 0.45
cp1125.pyFile · 0.45

Calls 4

CookieErrorClass · 0.85
_has_control_characterFunction · 0.85
itemsMethod · 0.45
lowerMethod · 0.45

Tested by 7

test_eqMethod · 0.76
test_copyMethod · 0.76
test_setdefaultMethod · 0.76
test_updateMethod · 0.76
test_pickleMethod · 0.76
test_reprMethod · 0.76