Staging
v0.5.1
https://github.com/python/cpython
Raw File
Tip revision: b26441ee1f896d893862f402119b9001cc71c35b authored by Ned Deily on 18 June 2019, 21:02:54 UTC
3.7.4rc1
Tip revision: b26441e
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