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

Method unwrap

suds/sudsobject.py:370–383  ·  view source on GitHub ↗

translate (unwrap) using an optional wrapper function

(self, d, item)

Source from the content-addressed store, hash-verified

368 return ''.join(s)
369
370 def unwrap(self, d, item):
371 """ translate (unwrap) using an optional wrapper function """
372 nopt = lambda x: x
373 try:
374 md = d.__metadata__
375 pmd = getattr(md, '__print__', None)
376 if pmd is None:
377 return item
378 wrappers = getattr(pmd, 'wrappers', {})
379 fn = wrappers.get(item[0], nopt)
380 return (item[0], fn(item[1]))
381 except:
382 pass
383 return item
384
385 def exclude(self, d, item):
386 """ check metadata for excluded items """

Callers 1

print_objectMethod · 0.95

Calls 1

getMethod · 0.45

Tested by

no test coverage detected