Staging
v0.5.1
https://github.com/python/cpython
Raw File
Tip revision: db455296be5f792b8c12b7cd7f3962b52e4f44ee authored by Ɓukasz Langa on 23 September 2020, 12:36:32 UTC
Python 3.8.6
Tip revision: db45529
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