doctest_aliases.py 240 B

12345678910111213
  1. # Used by test_doctest.py.
  2. class TwoNames:
  3. '''f() and g() are two names for the same method'''
  4. def f(self):
  5. '''
  6. >>> print(TwoNames().f())
  7. f
  8. '''
  9. return 'f'
  10. g = f # define an alias for f