forked from github/codeql
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.py
More file actions
29 lines (26 loc) · 730 Bytes
/
test.py
File metadata and controls
29 lines (26 loc) · 730 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#Test flow control for augmented assignment statements:
#Parameters
def func1(s, o, x, y, z):
#Note that the right hand sides should be sufficiently complex
#to make the parts of the statement sufficiently separated
x += f(y, (1,2,3))
o.val.item += f(y, (1,2,3))
s[z, 10, 1:3] += f(y, (1,2,3))
return x
#Local variables
def func2():
s = None
o = None
x = None
y = None
z = None
#Note that the right hand sides should be sufficiently complex
#to make the parts of the statement sufficiently separated
x += f(y, (1,2,3))
o.val.item += f(y, (1,2,3))
s[z, 10, 1:3] += f(y, (1,2,3))
return x
#Complex flow
def comp(v, cond):
v += a if cond else b
return v