MCPcopy Index your code
hub / github.com/RustPython/RustPython / load

Method load

Lib/http/cookies.py:530–542  ·  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

528 return _nulljoin(result)
529
530 def load(self, rawdata):
531 """Load cookies from a string (presumably HTTP_COOKIE) or
532 from a dictionary. Loading cookies from a dictionary 'd'
533 is equivalent to calling:
534 map(Cookie.__setitem__, d.keys(), d.values())
535 """
536 if isinstance(rawdata, str):
537 self.__parse_string(rawdata)
538 else:
539 # self.update() wouldn't call our custom __setitem__
540 for key, value in rawdata.items():
541 self[key] = value
542 return
543
544 def __parse_string(self, str, patt=_CookiePattern):
545 i = 0 # Our starting point

Callers 4

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

Calls 3

__parse_stringMethod · 0.95
isinstanceFunction · 0.85
itemsMethod · 0.45

Tested by

no test coverage detected