Staging
v0.5.1
https://github.com/python/cpython
Raw File
Tip revision: 43364a7ae01fbe4288ef42622259a0038ce1edcc authored by Ned Deily on 18 December 2019, 18:48:49 UTC
3.7.6
Tip revision: 43364a7
doctest_aliases.py
# Used by test_doctest.py.

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

    def f(self):
        '''
        >>> print(TwoNames().f())
        f
        '''
        return 'f'

    g = f # define an alias for f
back to top