PersistentOverride

digraph InheritanceGraph { graph [bgcolor=transparent, color=lightsteelblue2, fontname=Arial, fontsize=10, outputorder=edgesfirst, overlap=prism, penwidth=2, rankdir=LR, splines=spline, style="dashed, rounded", truecolor=true]; node [colorscheme=pastel19, fontname=Arial, fontsize=10, height=0, penwidth=2, shape=box, style="filled, rounded", width=0]; edge [color=lightslategrey, penwidth=1]; subgraph "cluster_abjad.segments" { graph [label="abjad.segments"]; node [color=1]; "abjad.segments.PersistentOverride.PersistentOverride" [URL="../api/abjad/segments/PersistentOverride.html#abjad.segments.PersistentOverride.PersistentOverride", color=black, fontcolor=white, label="Persistent\nOverride", target=_top]; } subgraph "cluster_abjad.system" { graph [label="abjad.system"]; node [color=2]; "abjad.system.AbjadObject.AbjadObject" [URL="../api/abjad/segments/../system/AbjadObject.html#abjad.system.AbjadObject.AbjadObject", label="Abjad\nObject", target=_top]; } subgraph cluster_builtins { graph [label=builtins]; node [color=3]; "builtins.object" [URL="https://docs.python.org/3.6/library/functions.html#object", label=object, target=_top]; } "abjad.system.AbjadObject.AbjadObject" -> "abjad.segments.PersistentOverride.PersistentOverride"; "builtins.object" -> "abjad.system.AbjadObject.AbjadObject"; }

class abjad.segments.PersistentOverride.PersistentOverride(after=None, attribute=None, context=None, grob=None, hide=None, value=None)

Persistent override.

>>> override = abjad.PersistentOverride(
...     attribute='bar_extent',
...     context='Staff',
...     grob='bar_line',
...     value=(-2, 0),
...     )
>>> abjad.f(override)
abjad.PersistentOverride(
    attribute='bar_extent',
    context='Staff',
    grob='bar_line',
    value=(-2, 0),
    )

Attributes Summary

__eq__ Is true when argument is persistent override with attribute, context, grob, value equal to those of this persistent override.
__hash__ Hashes persistent override.
after Is true when override formats after leaf.
attribute Gets attribute.
context Gets context.
grob Gets grob.
hide Is true when staff lines should not appear in output.
parameter Is true.
value Gets value.

Special methods

__eq__(argument)

Is true when argument is persistent override with attribute, context, grob, value equal to those of this persistent override.

>>> override_1 = abjad.PersistentOverride(
...     attribute='bar_extent',
...     context='Staff',
...     grob='bar_line',
...     value=(-2, 0),
...     )
>>> override_2 = abjad.PersistentOverride(
...     attribute='bar_extent',
...     context='Staff',
...     grob='bar_line',
...     value=(-2, 0),
...     )
>>> override_3 = abjad.PersistentOverride(
...     attribute='bar_extent',
...     context='Score',
...     grob='bar_line',
...     value=(-2, 0),
...     )
>>> override_1 == override_1
True
>>> override_1 == override_2
True
>>> override_1 == override_3
False
>>> override_2 == override_1
True
>>> override_2 == override_2
True
>>> override_2 == override_3
False
>>> override_3 == override_1
False
>>> override_3 == override_2
False
>>> override_3 == override_3
True
Return type:bool
(AbjadObject).__format__(format_specification='')

Formats Abjad object.

Set format_specification to '' or 'storage'. Interprets '' equal to 'storage'.

Returns string.

__hash__()

Hashes persistent override.

Return type:int
(AbjadObject).__repr__()

Gets interpreter representation of Abjad object.

Returns string.


Read-only properties

after

Is true when override formats after leaf.

>>> override = abjad.PersistentOverride(
...     attribute='bar_extent',
...     context='Staff',
...     grob='bar_line',
...     value=(-2, 0),
...     )
>>> override.after is None
True
Return type:Optional[bool]
attribute

Gets attribute.

>>> override = abjad.PersistentOverride(
...     attribute='bar_extent',
...     context='Staff',
...     grob='bar_line',
...     value=(-2, 0),
...     )
>>> override.attribute
'bar_extent'
Return type:Optional[str]
context

Gets context.

>>> override = abjad.PersistentOverride(
...     attribute='bar_extent',
...     context='Staff',
...     grob='bar_line',
...     value=(-2, 0),
...     )
>>> override.context
'Staff'
Return type:Optional[str]
grob

Gets grob.

>>> override = abjad.PersistentOverride(
...     attribute='bar_extent',
...     context='Staff',
...     grob='bar_line',
...     value=(-2, 0),
...     )
>>> override.grob
'bar_line'
Return type:Optional[str]
hide

Is true when staff lines should not appear in output.

>>> override = abjad.PersistentOverride(
...     attribute='bar_extent',
...     context='Staff',
...     grob='bar_line',
...     value=(-2, 0),
...     )
>>> override.hide is None
True
Return type:Optional[bool]
parameter

Is true.

>>> override = abjad.PersistentOverride(
...     attribute='bar_extent',
...     context='Staff',
...     grob='bar_line',
...     value=(-2, 0),
...     )
>>> override.parameter
True

Class constant.

Return type:bool
value

Gets value.

>>> override = abjad.PersistentOverride(
...     attribute='bar_extent',
...     context='Staff',
...     grob='bar_line',
...     value=(-2, 0),
...     )
>>> override.value
(-2, 0)
Return type:Optional[str]