https://github.com/python/cpython/commit/a327810169982e3782bdefc2247789a71aa79b43
commit: a327810169982e3782bdefc2247789a71aa79b43
branch: main
author: RUANG (James Roy) <[email protected]>
committer: pablogsal <[email protected]>
date: 2025-01-01T20:39:28Z
summary:
Fix while statements with non-bool conditions in `_pyrepl` (#127509)
Fix non-bool value conditions
files:
M Lib/_pyrepl/simple_interact.py
M Lib/_pyrepl/unix_console.py
diff --git a/Lib/_pyrepl/simple_interact.py b/Lib/_pyrepl/simple_interact.py
index 342a4b58bfd0f3..a5033496712a73 100644
--- a/Lib/_pyrepl/simple_interact.py
+++ b/Lib/_pyrepl/simple_interact.py
@@ -138,7 +138,7 @@ def maybe_run_command(statement: str) -> bool:
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 2576b938a34c64..63e8fc24dd7625 100644
--- a/Lib/_pyrepl/unix_console.py
+++ b/Lib/_pyrepl/unix_console.py
@@ -786,7 +786,7 @@ def __tputs(self, fmt, prog=delayprog):
# 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)
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]