# Path: consort/tools/HashCachingObject.py
# class HashCachingObject(abctools.AbjadValueObject):
# 
#     ### CLASS VARIABLES ###
# 
#     __slots__ = (
#         '_format',
#         '_hash',
#         )
# 
#     ### INITIALIZER ###
# 
#     def __init__(self):
#         self._format = None
#         self._hash = None
# 
#     ### SPECIAL METHODS ###
# 
#     #@profile
#     def __eq__(self, expr):
#         if isinstance(expr, type(self)):
#             if format(self) == format(expr):
#                 return True
#         return False
# 
#     #@profile
#     def __format__(self, format_specification=''):
#         if self._format is None:
#             agent = systemtools.StorageFormatAgent(self)
#             self._format = agent.get_storage_format()
#         return self._format
# 
#     #@profile
#     def __hash__(self):
#         if self._hash is None:
#             self._hash = hash((type(self), format(self)))
#         return self._hash


import abjad
import collections
import copy
    import funcsigs
    import inspect as funcsigs
from abjad import attach
from consort.tools.HashCachingObject import HashCachingObject
                            ),
                        ),
                    ),
                )

        ::

            >>> attachment_expression = consort.AttachmentExpression(
            ...     attachments=(
            ...         consort.SimpleDynamicExpression(
            ...             hairpin_start_token='sfz',
            ...             hairpin_stop_token='niente',
            ...             ),
            ...         ),
            ...     selector=abjad.Selector().by_leaf().by_run(abjad.Note),
            ...     )

        ::

            >>> staff = abjad.Staff("c'8 r8 d'8 e'8 r8 f'8 g'8 a'8")
            >>> attachment_expression(staff)
            >>> print(format(staff))
            \new Staff {
                c'8 \sfz
                r8
                \override Hairpin.circled-tip = ##t
                d'8 \> \sfz
                \revert Hairpin.circled-tip
                e'8 \!
                r8

# Path: consort/tools/HashCachingObject.py
# class HashCachingObject(abctools.AbjadValueObject):
# 
#     ### CLASS VARIABLES ###
# 
#     __slots__ = (
#         '_format',
#         '_hash',
#         )
# 
#     ### INITIALIZER ###
# 
#     def __init__(self):
#         self._format = None
#         self._hash = None
# 
#     ### SPECIAL METHODS ###
# 
#     #@profile
#     def __eq__(self, expr):
#         if isinstance(expr, type(self)):
#             if format(self) == format(expr):
#                 return True
#         return False
# 
#     #@profile
#     def __format__(self, format_specification=''):
#         if self._format is None:
#             agent = systemtools.StorageFormatAgent(self)
#             self._format = agent.get_storage_format()
#         return self._format
# 
#     #@profile
#     def __hash__(self):
#         if self._hash is None:
#             self._hash = hash((type(self), format(self)))
#         return self._hash


# Path: consort/tools/AttachmentExpression.py
import abjad
import collections
import copy
    import funcsigs
    import inspect as funcsigs
from abjad import attach
from consort.tools.HashCachingObject import HashCachingObject

                            ),
                        ),
                    ),
                )

        ::

            >>> attachment_expression = consort.AttachmentExpression(
            ...     attachments=(
            ...         consort.SimpleDynamicExpression(
            ...             hairpin_start_token='sfz',
            ...             hairpin_stop_token='niente',
            ...             ),
            ...         ),
            ...     selector=abjad.Selector().by_leaf().by_run(abjad.Note),
            ...     )

        ::

            >>> staff = abjad.Staff("c'8 r8 d'8 e'8 r8 f'8 g'8 a'8")
            >>> attachment_expression(staff)
            >>> print(format(staff))
            \new Staff {
                c'8 \sfz
                r8
                \override Hairpin.circled-tip = ##t
                d'8 \> \sfz
                \revert Hairpin.circled-tip
                e'8 \!
                r8

                \override Hairpin.circled-tip = ##t