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

Method prepend

suds/xsd/sxbase.py:53–68  ·  view source on GitHub ↗

Prepend schema object's from B{s}ource list to the B{d}estination list while applying the filter. @param d: The destination list. @type d: list @param s: The source list. @type s: list @param filter: A filter that allows items to be prepended.

(cls, d, s, filter=Filter())

Source from the content-addressed store, hash-verified

51
52 @classmethod
53 def prepend(cls, d, s, filter=Filter()):
54 """
55 Prepend schema object's from B{s}ource list to
56 the B{d}estination list while applying the filter.
57 @param d: The destination list.
58 @type d: list
59 @param s: The source list.
60 @type s: list
61 @param filter: A filter that allows items to be prepended.
62 @type filter: L{Filter}
63 """
64 i = 0
65 for x in s:
66 if x in filter:
67 d.insert(i, x)
68 i += 1
69
70 @classmethod
71 def append(cls, d, s, filter=Filter()):

Callers 3

bootbox.min.jsFile · 0.80
mergeMethod · 0.80
mergeMethod · 0.80

Calls 2

FilterClass · 0.90
insertMethod · 0.45

Tested by

no test coverage detected