Skip to content

Commit a327810

Browse files
authored
Fix while statements with non-bool conditions in _pyrepl (#127509)
Fix non-bool value conditions
1 parent bb9d955 commit a327810

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Lib/_pyrepl/simple_interact.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def maybe_run_command(statement: str) -> bool:
138138

139139
return False
140140

141-
while 1:
141+
while True:
142142
try:
143143
try:
144144
sys.stdout.flush()

Lib/_pyrepl/unix_console.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,7 @@ def __tputs(self, fmt, prog=delayprog):
786786
# only if the bps is actually needed (which I'm
787787
# betting is pretty unlkely)
788788
bps = ratedict.get(self.__svtermstate.ospeed)
789-
while 1:
789+
while True:
790790
m = prog.search(fmt)
791791
if not m:
792792
os.write(self.output_fd, fmt)

0 commit comments

Comments
 (0)