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

Method content

suds/xsd/sxbase.py:402–425  ·  view source on GitHub ↗

Get a I{flattened} list of this nodes contents. @param collection: A list to fill. @type collection: list @param filter: A filter used to constrain the result. @type filter: L{Filter} @param history: The history list used to prevent cyclic dependency.

(self, collection=None, filter=Filter(), history=None)

Source from the content-addressed store, hash-verified

400 setattr(self, n, v)
401
402 def content(self, collection=None, filter=Filter(), history=None):
403 """
404 Get a I{flattened} list of this nodes contents.
405 @param collection: A list to fill.
406 @type collection: list
407 @param filter: A filter used to constrain the result.
408 @type filter: L{Filter}
409 @param history: The history list used to prevent cyclic dependency.
410 @type history: list
411 @return: The filled list.
412 @rtype: list
413 """
414 if collection is None:
415 collection = []
416 if history is None:
417 history = []
418 if self in history:
419 return collection
420 history.append(self)
421 if self in filter:
422 collection.append(self)
423 for c in self.rawchildren:
424 c.content(collection, filter, history[:])
425 return collection
426
427 def str(self, indent=0, history=None):
428 """

Callers 1

dereferenceMethod · 0.80

Calls 2

FilterClass · 0.90
appendMethod · 0.45

Tested by

no test coverage detected