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

Method output

Lib/http/cookies.py:518–527  ·  view source on GitHub ↗

Return a string suitable for HTTP.

(self, attrs=None, header="Set-Cookie:", sep="\015\012")

Source from the content-addressed store, hash-verified

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."""
520 result = []
521 items = sorted(self.items())
522 for key, value in items:
523 value_output = value.output(attrs, header)
524 if _has_control_character(value_output):
525 raise CookieError("Control characters are not allowed in cookies")
526 result.append(value_output)
527 return sep.join(result)
528
529 __str__ = output
530

Callers

nothing calls this directly

Calls 6

_has_control_characterFunction · 0.85
CookieErrorClass · 0.85
itemsMethod · 0.45
outputMethod · 0.45
appendMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected