blob: 5db705ce8bfe41dba0173b9baa9934572621b259 [file] [log] [blame]
Tor Norbye3a2425a2013-11-04 10:16:08 -08001def deco(fun):
2 return fun # valid
3
4class FooClass:
5 staticField = deco
6 globs = globals()
7 def __init__(self):
8 self.instanceField = 2
9
10 @deco
11 def fooFunction(fooParam1, fooParam2=0) :
12 notAField = 3
13 pass
14
15def topLevelFunction(tlfp1, tlfp2) :
16 pass
17
18top1 = 1
19if True:
20 top2 = 2
21
22class BarClass(object):
23 __value = 0
24
25 def __get(self):
26 return self.__value
27
28 def __set(self, val):
29 self.__value = val
30
31 value = property(__get)
32 setvalue = property(fset=__set)
33
34class BazClass(object):
35 __x = 1
36
37 @property
38 def x(self):
39 return self.__x
40
41 @x.setter
42 def x(self, v):
43 self.__x = v
44
45