コード例 #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
ファイル: Context.py プロジェクト: jdavancens/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()