check.assert_components — Abjad v1.1.1 documentation

### Navigation

- index
- modules |
- next |
- previous |
- Project Abjad »
- Abjad v1.1.1 documentation »
- Abjad API »

# check.assert_components

`abjad.tools.check.` `assert_components`(expr, klasses=(<class 'abjad.component.component._Component'>, ), contiguity=None, share=None, allow_orphans=True)

  Assert expr is a Python list of Abjad components. Set _contiguity_ to None, ‘strict’ or ‘thread’. Set _share_ to None, ‘parent’, ‘score’ or ‘thread’.

  The allow_orphans keyword works as a type of bypass. If allow_orphans is set to True (which it is by default), and if expr is a Python list of orphan components, then the function will always evaluate to True, regardless of the checks specified by the other keywords.

  On the other hand, if the allow_orphans keyword is set to False, then expr must meet the checks specified by the other keywords in other for the function to evaluate to True.

  Calls to this function appear at the beginning of many functions. Calls to this function also iterate all elements in expr. For this reason, you can turn off all calls to this function. Set something in cfg.

### Navigation

- index
- modules |
- next |
- previous |
- Project Abjad »
- Abjad v1.1.1 documentation »
- Abjad API »