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

Method __setstate__

Lib/http/cookies.py:374–383  ·  view source on GitHub ↗
(self, state)

Source from the content-addressed store, hash-verified

372 }
373
374 def __setstate__(self, state):
375 key = state['key']
376 value = state['value']
377 coded_value = state['coded_value']
378 if _has_control_character(key, value, coded_value):
379 raise CookieError("Control characters are not allowed in cookies "
380 f"{key!r} {value!r} {coded_value!r}")
381 self._key = key
382 self._value = value
383 self._coded_value = coded_value
384
385 def output(self, attrs=None, header="Set-Cookie:"):
386 return "%s %s" % (header, self.OutputString(attrs))

Callers 1

Calls 2

_has_control_characterFunction · 0.85
CookieErrorClass · 0.85

Tested by 1