spannertools.is_component_with_beam_spanner_attached

abjad.tools.spannertools.is_component_with_beam_spanner_attached.is_component_with_beam_spanner_attached(expr)[source]

New in version 2.0.

True when expr is component with beam spanner attached:

abjad> staff = Staff("c'8 d'8 e'8 f'8")
abjad> beam = spannertools.BeamSpanner(staff.leaves)
abjad> spannertools.is_component_with_beam_spanner_attached(staff[0])
True

Otherwise false:

abjad> note = Note("c'8")
abjad> spannertools.is_component_with_beam_spanner_attached(note)
False

Return boolean.

Changed in version 2.0: renamed beamtools.is_component_with_beam_spanner_attached() to spannertools.is_component_with_beam_spanner_attached().

This Page