move sections
[python/dscho.git] / Lib / test / inspect_fodder2.py
blob3d978cffe3d38c088e6c4d194909a2001700cee1
1 # line 1
2 def wrap(foo=None):
3 def wrapper(func):
4 return func
5 return wrapper
7 # line 7
8 def replace(func):
9 def insteadfunc():
10 print 'hello'
11 return insteadfunc
13 # line 13
14 @wrap()
15 @wrap(wrap)
16 def wrapped():
17 pass
19 # line 19
20 @replace
21 def gone():
22 pass
24 # line 24
25 oll = lambda m: m
27 # line 27
28 tll = lambda g: g and \
29 g and \
32 # line 32
33 tlli = lambda d: d and \
36 # line 36
37 def onelinefunc(): pass
39 # line 39
40 def manyargs(arg1, arg2,
41 arg3, arg4): pass
43 # line 43
44 def twolinefunc(m): return m and \
47 # line 47
48 a = [None,
49 lambda x: x,
50 None]
52 # line 52
53 def setfunc(func):
54 globals()["anonymous"] = func
55 setfunc(lambda x, y: x*y)
57 # line 57
58 def with_comment(): # hello
59 world
61 # line 61
62 multiline_sig = [
63 lambda (x,
64 y): x+y,
65 None,
68 # line 68
69 def func69():
70 class cls70:
71 def func71():
72 pass
73 return cls70
74 extra74 = 74
76 # line 76
77 def func77(): pass
78 (extra78, stuff78) = 'xy'
79 extra79 = 'stop'
81 # line 81
82 class cls82:
83 def func83(): pass
84 (extra84, stuff84) = 'xy'
85 extra85 = 'stop'
87 # line 87
88 def func88():
89 # comment
90 return 90
92 # line 92
93 def f():
94 class X:
95 def g():
96 "doc"
97 return 42
98 return X
99 method_in_dynamic_class = f().g.im_func