PageRenderTime 18ms CodeModel.GetById 15ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/Lib/test/doctest_aliases.py

http://unladen-swallow.googlecode.com/
Python | 13 lines | 4 code | 3 blank | 6 comment | 0 complexity | 225c9f03e9fde5e3cdeecf52aadbb6fb MD5 | raw file
 1# Used by test_doctest.py.
 2
 3class TwoNames:
 4    '''f() and g() are two names for the same method'''
 5
 6    def f(self):
 7        '''
 8        >>> print TwoNames().f()
 9        f
10        '''
11        return 'f'
12
13        g = f # define an alias for f