MCPcopy Create free account
hub / github.com/ronreiter/interactive-tutorials / process

Method process

suds/sudsobject.py:265–286  ·  view source on GitHub ↗

print object using the specified indent (n) and newline (nl).

(self, object, h, n=0, nl=False)

Source from the content-addressed store, hash-verified

263 return self.process(object, history, indent)
264
265 def process(self, object, h, n=0, nl=False):
266 """ print object using the specified indent (n) and newline (nl). """
267 if object is None:
268 return 'None'
269 if isinstance(object, Object):
270 if len(object) == 0:
271 return '<empty>'
272 else:
273 return self.print_object(object, h, n+2, nl)
274 if isinstance(object, dict):
275 if len(object) == 0:
276 return '<empty>'
277 else:
278 return self.print_dictionary(object, h, n+2, nl)
279 if isinstance(object, (list, tuple)):
280 if len(object) == 0:
281 return '<empty>'
282 else:
283 return self.print_collection(object, h, n+2)
284 if isinstance(object, basestring):
285 return '"%s"' % tostr(object)
286 return '%s' % tostr(object)
287
288 def print_object(self, d, h, n, nl=False):
289 """ print complex using the specified indent (n) and newline (nl). """

Callers 4

tostrMethod · 0.95
print_objectMethod · 0.95
print_dictionaryMethod · 0.95
print_collectionMethod · 0.95

Calls 4

print_objectMethod · 0.95
print_dictionaryMethod · 0.95
print_collectionMethod · 0.95
tostrFunction · 0.85

Tested by

no test coverage detected