MCPcopy Index your code
hub / github.com/ronreiter/interactive-tutorials / add_attributes

Method add_attributes

suds/builder.py:96–101  ·  view source on GitHub ↗

add required attributes

(self, data, type)

Source from the content-addressed store, hash-verified

94 self.process(data, child, history[:])
95
96 def add_attributes(self, data, type):
97 """ add required attributes """
98 for attr, ancestry in type.attributes():
99 name = '_%s' % attr.name
100 value = attr.get_default()
101 setattr(data, name, value)
102
103 def skip_child(self, child, ancestry):
104 """ get whether or not to skip the specified child """

Callers 2

buildMethod · 0.95
processMethod · 0.95

Calls 2

attributesMethod · 0.80
get_defaultMethod · 0.80

Tested by

no test coverage detected