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

Method insert

suds/sax/element.py:335–353  ·  view source on GitHub ↗

Insert an L{Element} content at the specified index. @param objects: A (single|collection) of attribute(s) or element(s) to be added as children. @type objects: (L{Element}|L{Attribute}) @param index: The position in the list of children to insert.

(self, objects, index=0)

Source from the content-addressed store, hash-verified

333 return self
334
335 def insert(self, objects, index=0):
336 """
337 Insert an L{Element} content at the specified index.
338 @param objects: A (single|collection) of attribute(s) or element(s)
339 to be added as children.
340 @type objects: (L{Element}|L{Attribute})
341 @param index: The position in the list of children to insert.
342 @type index: int
343 @return: self
344 @rtype: L{Element}
345 """
346 objects = (objects,)
347 for child in objects:
348 if isinstance(child, Element):
349 self.children.insert(index, child)
350 child.parent = self
351 else:
352 raise Exception('append %s not-valid' % child.__class__.__name__)
353 return self
354
355 def remove(self, child):
356 """

Callers 8

signupFunction · 0.45
updateDocFunction · 0.45
createMethod · 0.45
replaceChildMethod · 0.45
__setitem__Method · 0.45
applyMethod · 0.45
addMethod · 0.45
prependMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected