Skip to content

Commit daed095

Browse files
committed
update definition of false variable for test case
1 parent 4f9941b commit daed095

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Lib/test/test_capi/test_opt.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1504,7 +1504,8 @@ def f(n):
15041504
trace = []
15051505
for i in range(n):
15061506
# zero is always (int) 0, but we can only prove that it's a integer:
1507-
zero = i - i
1507+
false = i == TIER2_THRESHOLD # this will always be false, while hopefully still fooling optimizer improvements
1508+
zero = false + 0 # this should always set the variable zero equal to 0
15081509
trace.append("A")
15091510
if not zero: # Kept.
15101511
trace.append("B")

0 commit comments

Comments
 (0)