File: doctest_aliases.py

package info (click to toggle)
edk2 0~20181115.85588389-3%2Bdeb10u3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 239,240 kB
  • sloc: ansic: 2,289,349; python: 445,187; perl: 157,704; asm: 59,891; cpp: 21,893; sh: 4,328; pascal: 2,169; makefile: 2,168; xml: 387; lisp: 34
file content (13 lines) | stat: -rw-r--r-- 252 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
# 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