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

Method writeln

Lib/plistlib.py:318–327  ·  view source on GitHub ↗
(self, line)

Source from the content-addressed store, hash-verified

316 self.writeln("<%s/>" % element)
317
318 def writeln(self, line):
319 if line:
320 # plist has fixed encoding of utf-8
321
322 # XXX: is this test needed?
323 if isinstance(line, str):
324 line = line.encode('utf-8')
325 self.file.write(self._indent_level * self.indent)
326 self.file.write(line)
327 self.file.write(b'\n')
328
329
330class _PlistWriter(_DumbXMLWriter):

Callers 5

begin_elementMethod · 0.95
end_elementMethod · 0.95
simple_elementMethod · 0.95
writeMethod · 0.45
write_bytesMethod · 0.45

Calls 3

isinstanceFunction · 0.85
encodeMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected