summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorRUANG (James Roy) <rruuaanng@outlook.com>2025-01-01 20:39:28 (GMT)
committerGitHub <noreply@github.com>2025-01-01 20:39:28 (GMT)
commita327810169982e3782bdefc2247789a71aa79b43 (patch)
tree887842c72e8204da4f17e531b710a38ac3467aa3 /Lib
parentbb9d955e16c5578bdbc72750fbbffc8313559109 (diff)
downloadcpython-a327810169982e3782bdefc2247789a71aa79b43.zip
cpython-a327810169982e3782bdefc2247789a71aa79b43.tar.gz
cpython-a327810169982e3782bdefc2247789a71aa79b43.tar.bz2
Fix while statements with non-bool conditions in `_pyrepl` (#127509)
Fix non-bool value conditions
Diffstat (limited to 'Lib')
-rw-r--r--Lib/_pyrepl/simple_interact.py2
-rw-r--r--Lib/_pyrepl/unix_console.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/Lib/_pyrepl/simple_interact.py b/Lib/_pyrepl/simple_interact.py
index 342a4b5..a503349 100644
--- a/Lib/_pyrepl/simple_interact.py
+++ b/Lib/_pyrepl/simple_interact.py
@@ -138,7 +138,7 @@ def run_multiline_interactive_console(
return False
- while 1:
+ while True:
try:
try:
sys.stdout.flush()
diff --git a/Lib/_pyrepl/unix_console.py b/Lib/_pyrepl/unix_console.py
index 2576b93..63e8fc2 100644
--- a/Lib/_pyrepl/unix_console.py
+++ b/Lib/_pyrepl/unix_console.py
@@ -786,7 +786,7 @@ class UnixConsole(Console):
# only if the bps is actually needed (which I'm
# betting is pretty unlkely)
bps = ratedict.get(self.__svtermstate.ospeed)
- while 1:
+ while True:
m = prog.search(fmt)
if not m:
os.write(self.output_fd, fmt)