New in version 1.1.
Get the only spanner attached to component:
abjad> staff = Staff("c'8 d'8 e'8 f'8")
abjad> beam = spannertools.BeamSpanner(staff.leaves)
abjad> slur = spannertools.SlurSpanner(staff.leaves)
abjad> trill = spannertools.TrillSpanner(staff)
abjad> f(staff)
\new Staff {
c'8 [ ( \startTrillSpan
d'8
e'8
f'8 ] ) \stopTrillSpan
}
abjad> print spannertools.get_the_only_spanner_attached_to_component(staff)
TrillSpanner({c'8, d'8, e'8, f'8})
Raise missing spanner error when no spanner attached to component.
Raise extra spanner error when more than one spanner attached to component.
Return a single spanner.
Note
function will usually be called with klass specifier set.