MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / dumps

Method dumps

tools/python-3.11.9-amd64/Lib/xmlrpc/client.py:493–518  ·  view source on GitHub ↗
(self, values)

Source from the content-addressed store, hash-verified

491 dispatch = {}
492
493 def dumps(self, values):
494 out = []
495 write = out.append
496 dump = self.__dump
497 if isinstance(values, Fault):
498 # fault instance
499 write("<fault>\n")
500 dump({'faultCode': values.faultCode,
501 'faultString': values.faultString},
502 write)
503 write("</fault>\n")
504 else:
505 # parameter block
506 # FIXME: the xml-rpc specification allows us to leave out
507 # the entire <params> block if there are no parameters.
508 # however, changing this may break older code (including
509 # old versions of xmlrpclib.py), so this is better left as
510 # is for now. See @XMLRPC3 for more information. /F
511 write("<params>\n")
512 for v in values:
513 write("<param>\n")
514 dump(v, write)
515 write("</param>\n")
516 write("</params>\n")
517 result = "".join(out)
518 return result
519
520 def __dump(self, value, write):
521 try:

Callers 15

dumpsFunction · 0.95
handleMethod · 0.45
makePickleMethod · 0.45
get_dataMethod · 0.45
test_ParseErrorMethod · 0.45
testPickleMethod · 0.45
test_pickle_unpickleMethod · 0.45
testPickleMethod · 0.45
pickle_codeFunction · 0.45

Calls 3

writeFunction · 0.50
dumpFunction · 0.50
joinMethod · 0.45