Staging
v0.5.1
https://github.com/python/cpython
Raw File
Tip revision: 1bf9cc509326bc42cd8cb1650eb9bf64550d817e authored by Ned Deily on 27 June 2018, 01:03:55 UTC
3.7.0 final
Tip revision: 1bf9cc5
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