Staging
v0.5.1
https://github.com/python/cpython
Raw File
Tip revision: c0a9afe2ac1820409e6173bd1893ebee2cf50270 authored by Ned Deily on 15 August 2020, 06:43:26 UTC
3.6.12
Tip revision: c0a9afe
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