quantlab.core.component.child_components#

quantlab.core.component.child_components(root, path='')[source]#

Yield the components held directly in root’s declared fields, with their paths.

The first level of walk_components: each item of a declared component field of root.config, in field order, None skipped.

Parameters:
rootComponent

The component whose fields are read.

pathstr, optional

The path of root itself, prefixed to every path yielded.

Yields:
tuple[str, Component]

A path and the component found there.

Examples

>>> [path for path, _ in child_components(label)]
['factor']