]> git.proxmox.com Git - mirror_edk2.git/blame - AppPkg/Applications/Python/Python-2.7.2/Lib/test/inspect_fodder2.py
EmbeddedPkg: Extend NvVarStoreFormattedLib LIBRARY_CLASS
[mirror_edk2.git] / AppPkg / Applications / Python / Python-2.7.2 / Lib / test / inspect_fodder2.py
CommitLineData
4710c53d 1# line 1\r
2def wrap(foo=None):\r
3 def wrapper(func):\r
4 return func\r
5 return wrapper\r
6\r
7# line 7\r
8def replace(func):\r
9 def insteadfunc():\r
10 print 'hello'\r
11 return insteadfunc\r
12\r
13# line 13\r
14@wrap()\r
15@wrap(wrap)\r
16def wrapped():\r
17 pass\r
18\r
19# line 19\r
20@replace\r
21def gone():\r
22 pass\r
23\r
24# line 24\r
25oll = lambda m: m\r
26\r
27# line 27\r
28tll = lambda g: g and \\r
29g and \\r
30g\r
31\r
32# line 32\r
33tlli = lambda d: d and \\r
34 d\r
35\r
36# line 36\r
37def onelinefunc(): pass\r
38\r
39# line 39\r
40def manyargs(arg1, arg2,\r
41arg3, arg4): pass\r
42\r
43# line 43\r
44def twolinefunc(m): return m and \\r
45m\r
46\r
47# line 47\r
48a = [None,\r
49 lambda x: x,\r
50 None]\r
51\r
52# line 52\r
53def setfunc(func):\r
54 globals()["anonymous"] = func\r
55setfunc(lambda x, y: x*y)\r
56\r
57# line 57\r
58def with_comment(): # hello\r
59 world\r
60\r
61# line 61\r
62multiline_sig = [\r
63 lambda (x,\r
64 y): x+y,\r
65 None,\r
66 ]\r
67\r
68# line 68\r
69def func69():\r
70 class cls70:\r
71 def func71():\r
72 pass\r
73 return cls70\r
74extra74 = 74\r
75\r
76# line 76\r
77def func77(): pass\r
78(extra78, stuff78) = 'xy'\r
79extra79 = 'stop'\r
80\r
81# line 81\r
82class cls82:\r
83 def func83(): pass\r
84(extra84, stuff84) = 'xy'\r
85extra85 = 'stop'\r
86\r
87# line 87\r
88def func88():\r
89 # comment\r
90 return 90\r
91\r
92# line 92\r
93def f():\r
94 class X:\r
95 def g():\r
96 "doc"\r
97 return 42\r
98 return X\r
99method_in_dynamic_class = f().g.im_func\r