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

Method dumps

Lib/xmlrpc/client.py:467–492  ·  view source on GitHub ↗
(self, values)

Source from the content-addressed store, hash-verified

465 dispatch = {}
466
467 def dumps(self, values):
468 out = []
469 write = out.append
470 dump = self.__dump
471 if isinstance(values, Fault):
472 # fault instance
473 write("<fault>\n")
474 dump({'faultCode': values.faultCode,
475 'faultString': values.faultString},
476 write)
477 write("</fault>\n")
478 else:
479 # parameter block
480 # FIXME: the xml-rpc specification allows us to leave out
481 # the entire <params> block if there are no parameters.
482 # however, changing this may break older code (including
483 # old versions of xmlrpclib.py), so this is better left as
484 # is for now. See @XMLRPC3 for more information. /F
485 write("<params>\n")
486 for v in values:
487 write("<param>\n")
488 dump(v, write)
489 write("</param>\n")
490 write("</params>\n")
491 result = "".join(out)
492 return result
493
494 def __dump(self, value, write):
495 try:

Callers 15

dumpsFunction · 0.95
inject_traceFunction · 0.45
write_glossary_jsonFunction · 0.45
compile_and_marshalFunction · 0.45
dumpFunction · 0.45
gradle_taskFunction · 0.45
_sendMethod · 0.45
_sendMethod · 0.45
attachFunction · 0.45
makePickleMethod · 0.45
_build_line_htmlMethod · 0.45

Calls 3

writeFunction · 0.50
dumpFunction · 0.50
joinMethod · 0.45

Tested by 2

dumpFunction · 0.36
test_dumpsMethod · 0.36