PyXR

c:\python24\lib \ test \ doctest_aliases.py



0001 # Used by test_doctest.py.
0002 
0003 class TwoNames:
0004     '''f() and g() are two names for the same method'''
0005 
0006     def f(self):
0007         '''
0008         >>> print TwoNames().f()
0009         f
0010         '''
0011         return 'f'
0012 
0013         g = f # define an alias for f
0014 

Generated by PyXR 0.9.4
SourceForge.net Logo