示例#1
0
文件: Context.py 项目: willingc/abjad
    def __repr__(self):
        r'''Gets interpreter representation of context.

        ::

            >>> context
            Context()

        Returns string.
        '''
        from abjad.tools import scoretools
        if all(isinstance(x, scoretools.Leaf) for x in self):
            return Container.__repr__(self)
        return self._get_abbreviated_string_format()
示例#2
0
文件: Context.py 项目: odub/abjad
    def __repr__(self):
        r'''Gets interpreter representation of context.

        ::

            >>> context
            Context()

        Returns string.
        '''
        from abjad.tools import scoretools
        if all(isinstance(x, scoretools.Leaf) for x in self):
            return Container.__repr__(self)
        return self._get_abbreviated_string_format()
示例#3
0
文件: Context.py 项目: ajyoon/abjad
    def __repr__(self):
        r'''Gets interpreter representation of context.

        ::

            >>> context = scoretools.Context(
            ...     name='MeterVoice',
            ...     context_name='TimeSignatureContext',
            ...     )
            >>> repr(context)
            'Context()'

        Returns string.
        '''
        from abjad.tools import scoretools
        if all(isinstance(x, scoretools.Leaf) for x in self):
            return Container.__repr__(self)
        return self._get_abbreviated_string_format()
示例#4
0
    def __repr__(self):
        r'''Gets interpreter representation of context.

        ::

            >>> context = scoretools.Context(
            ...     name='MeterVoice',
            ...     context_name='TimeSignatureContext',
            ...     )
            >>> repr(context)
            'Context()'

        Returns string.
        '''
        from abjad.tools import scoretools
        if all(isinstance(x, scoretools.Leaf) for x in self):
            return Container.__repr__(self)
        return self._get_abbreviated_string_format()