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

Class Part

suds/wsdl.py:383–415  ·  view source on GitHub ↗

Represents . @ivar element: The value of the {element} attribute. Stored as a I{qref} as converted by L{suds.xsd.qualify}. @type element: str @ivar type: The value of the {type} attribute. Stored as a I{qref} as converted by L{suds.xsd.quali

Source from the content-addressed store, hash-verified

381
382
383class Part(NamedObject):
384 """
385 Represents <message><part/></message>.
386 @ivar element: The value of the {element} attribute.
387 Stored as a I{qref} as converted by L{suds.xsd.qualify}.
388 @type element: str
389 @ivar type: The value of the {type} attribute.
390 Stored as a I{qref} as converted by L{suds.xsd.qualify}.
391 @type type: str
392 """
393
394 def __init__(self, root, definitions):
395 """
396 @param root: An XML root element.
397 @type root: L{Element}
398 @param definitions: A definitions object.
399 @type definitions: L{Definitions}
400 """
401 NamedObject.__init__(self, root, definitions)
402 pmd = Metadata()
403 pmd.wrappers = dict(element=repr, type=repr)
404 self.__metadata__.__print__ = pmd
405 tns = definitions.tns
406 self.element = self.__getref('element', tns)
407 self.type = self.__getref('type', tns)
408
409 def __getref(self, a, tns):
410 """ Get the qualified value of attribute named 'a'."""
411 s = self.root.get(a)
412 if s is None:
413 return s
414 else:
415 return qualify(s, self.root, tns)
416
417
418class Message(NamedObject):

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected