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

Method append

Lib/test/test_httplib.py:173–177  ·  view source on GitHub ↗
(self, item)

Source from the content-addressed store, hash-verified

171 list.__init__(self)
172 self.content_length = None
173 def append(self, item):
174 kv = item.split(b':', 1)
175 if len(kv) > 1 and kv[0].lower() == b'content-length':
176 self.content_length = kv[1].strip()
177 list.append(self, item)
178
179 # Here, we're testing that methods expecting a body get a
180 # content-length set to zero if the body is empty (either None or '')

Callers

nothing calls this directly

Calls 4

splitMethod · 0.45
lowerMethod · 0.45
stripMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected