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

Method _write_lines

Lib/email/generator.py:150–164  ·  view source on GitHub ↗
(self, lines)

Source from the content-addressed store, hash-verified

148 return s
149
150 def _write_lines(self, lines):
151 # We have to transform the line endings.
152 if not lines:
153 return
154 lines = NLCRE.split(lines)
155 for line in lines[:-1]:
156 self.write(line)
157 self.write(self._NL)
158 if lines[-1]:
159 self.write(lines[-1])
160 # XXX logic tells me this else should be needed, but the tests fail
161 # with it and pass without it. (NLCRE.split ends with a blank element
162 # if and only if there was a trailing newline.)
163 #else:
164 # self.write(self._NL)
165
166 def _write(self, msg):
167 # We can't write the headers yet because of the following scenario:

Callers 3

_handle_textMethod · 0.95
_handle_multipartMethod · 0.95
_handle_textMethod · 0.80

Calls 2

writeMethod · 0.95
splitMethod · 0.45

Tested by

no test coverage detected