doctest_aliases.py 240 Bytes
Newer Older
1 2 3 4 5 6 7
# Used by test_doctest.py.

class TwoNames:
    '''f() and g() are two names for the same method'''

    def f(self):
        '''
8
        >>> print(TwoNames().f())
9 10 11 12
        f
        '''
        return 'f'

Benjamin Peterson's avatar
Benjamin Peterson committed
13
    g = f # define an alias for f