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

Method dump_instance

Lib/xmlrpc/client.py:593–601  ·  view source on GitHub ↗
(self, value, write)

Source from the content-addressed store, hash-verified

591 dispatch[datetime] = dump_datetime
592
593 def dump_instance(self, value, write):
594 # check for special wrappers
595 if value.__class__ in WRAPPERS:
596 self.write = write
597 value.encode(self)
598 del self.write
599 else:
600 # store instance attributes as a struct (really?)
601 self.dump_struct(value.__dict__, write)
602 dispatch[DateTime] = dump_instance
603 dispatch[Binary] = dump_instance
604 # XXX(twouters): using "_arbitrary_instance" as key as a quick-fix

Callers

nothing calls this directly

Calls 2

dump_structMethod · 0.95
encodeMethod · 0.45

Tested by

no test coverage detected