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

Method __setitem__

Lib/http/cookies.py:509–516  ·  view source on GitHub ↗

Dictionary style assignment.

(self, key, value)

Source from the content-addressed store, hash-verified

507 dict.__setitem__(self, key, M)
508
509 def __setitem__(self, key, value):
510 """Dictionary style assignment."""
511 if isinstance(value, Morsel):
512 # allow assignment of constructed Morsels (e.g. for pickling)
513 dict.__setitem__(self, key, value)
514 else:
515 rval, cval = self.value_encode(value)
516 self.__set(key, rval, cval)
517
518 def output(self, attrs=None, header="Set-Cookie:", sep="\015\012"):
519 """Return a string suitable for HTTP."""

Callers

nothing calls this directly

Calls 3

value_encodeMethod · 0.95
__setMethod · 0.95
__setitem__Method · 0.45

Tested by

no test coverage detected