/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
- # 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