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)
| 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 |
no test coverage detected