summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorDong-hee Na <donghee.na@python.org>2023-08-12 19:36:46 (GMT)
committerGitHub <noreply@github.com>2023-08-12 19:36:46 (GMT)
commitbf707749e87f47b2fee2a208a654511ac318d4b9 (patch)
tree758506a88ce1b9177ad29b5a746aa8d60456adf8 /Tools
parent2e1f688fe0f0a612e54c09f5a7027a834dd8b8d5 (diff)
downloadcpython-bf707749e87f47b2fee2a208a654511ac318d4b9.zip
cpython-bf707749e87f47b2fee2a208a654511ac318d4b9.tar.gz
cpython-bf707749e87f47b2fee2a208a654511ac318d4b9.tar.bz2
gh-106797: Remove warning logs from Python/generated_cases.c.h and executor_cases.c.h (gh-107889)
gh-106797: Remove warning logs from Python/generated_cases.c.h
Diffstat (limited to 'Tools')
-rw-r--r--Tools/cases_generator/stacking.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Tools/cases_generator/stacking.py b/Tools/cases_generator/stacking.py
index d457ce0..9bb7f46 100644
--- a/Tools/cases_generator/stacking.py
+++ b/Tools/cases_generator/stacking.py
@@ -61,14 +61,14 @@ class StackOffset:
for eff in self.deep:
if eff.size:
terms.append(("-", maybe_parenthesize(eff.size)))
- elif eff.cond and eff.cond != "1":
+ elif eff.cond and eff.cond not in ("0", "1"):
terms.append(("-", f"({parenthesize_cond(eff.cond)} ? 1 : 0)"))
elif eff.cond != "0":
num -= 1
for eff in self.high:
if eff.size:
terms.append(("+", maybe_parenthesize(eff.size)))
- elif eff.cond and eff.cond != "1":
+ elif eff.cond and eff.cond not in ("0", "1"):
terms.append(("+", f"({parenthesize_cond(eff.cond)} ? 1 : 0)"))
elif eff.cond != "0":
num += 1