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

Method load

Lib/http/cookies.py:546–558  ·  view source on GitHub ↗

Load cookies from a string (presumably HTTP_COOKIE) or from a dictionary. Loading cookies from a dictionary 'd' is equivalent to calling: map(Cookie.__setitem__, d.keys(), d.values())

(self, rawdata)

Source from the content-addressed store, hash-verified

544 return _nulljoin(result)
545
546 def load(self, rawdata):
547 """Load cookies from a string (presumably HTTP_COOKIE) or
548 from a dictionary. Loading cookies from a dictionary 'd'
549 is equivalent to calling:
550 map(Cookie.__setitem__, d.keys(), d.values())
551 """
552 if isinstance(rawdata, str):
553 self.__parse_string(rawdata)
554 else:
555 # self.update() wouldn't call our custom __setitem__
556 for key, value in rawdata.items():
557 self[key] = value
558 return
559
560 def __parse_string(self, str, patt=_CookiePattern):
561 i = 0 # Our starting point

Callers 4

__init__Method · 0.95
mainFunction · 0.45
testFunction · 0.45
_mainFunction · 0.45

Calls 2

__parse_stringMethod · 0.95
itemsMethod · 0.45

Tested by

no test coverage detected