blob: f150ec6af5f342f9b7b6b41f9e209cde4350377a [file] [log] [blame]
Johannes Gijsberscb9015d2004-12-12 16:20:22 +00001# line 1
2def wrap(foo=None):
Tim Peters5a9fb3c2005-01-07 16:01:32 +00003 def wrapper(func):
4 return func
5 return wrapper
Johannes Gijsberscb9015d2004-12-12 16:20:22 +00006
7# line 7
8def replace(func):
Tim Peters5a9fb3c2005-01-07 16:01:32 +00009 def insteadfunc():
10 print 'hello'
11 return insteadfunc
Johannes Gijsberscb9015d2004-12-12 16:20:22 +000012
13# line 13
14@wrap()
15@wrap(wrap)
16def wrapped():
Tim Peters5a9fb3c2005-01-07 16:01:32 +000017 pass
Johannes Gijsberscb9015d2004-12-12 16:20:22 +000018
19# line 19
20@replace
21def gone():
Tim Peters5a9fb3c2005-01-07 16:01:32 +000022 pass
Johannes Gijsbers1542f342004-12-12 16:46:28 +000023
24# line 24
25oll = lambda m: m
26
27# line 27
28tll = lambda g: g and \
29g and \
30g
31
32# line 32
33tlli = lambda d: d and \
34 d
35
36# line 36
37def onelinefunc(): pass
38
39# line 39
40def manyargs(arg1, arg2,
41arg3, arg4): pass
42
43# line 43
44def twolinefunc(m): return m and \
45m
46
47# line 47
48a = [None,
49 lambda x: x,
50 None]
51
52# line 52
53def setfunc(func):
54 globals()["anonymous"] = func
55setfunc(lambda x, y: x*y)
Johannes Gijsbersa5855d52005-03-12 16:37:11 +000056
57# line 57
58def with_comment(): # hello
59 world
60
61# line 61
62multiline_sig = [
63 lambda (x,
64 y): x+y,
65 None,
66 ]
Armin Rigodd5c0232005-09-25 11:45:45 +000067
68# line 68
69def func69():
70 class cls70:
71 def func71():
72 pass
73 return cls70
74extra74 = 74
75
76# line 76
77def func77(): pass
78(extra78, stuff78) = 'xy'
79extra79 = 'stop'
80
81# line 81
82class cls82:
83 def func83(): pass
84(extra84, stuff84) = 'xy'
85extra85 = 'stop'
86
87# line 87
88def func88():
89 # comment
90 return 90