mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 05:31:20 +00:00 
			
		
		
		
	Fix while statements with non-bool conditions in _pyrepl (#127509)
				
					
				
			Fix non-bool value conditions
This commit is contained in:
		
							parent
							
								
									bb9d955e16
								
							
						
					
					
						commit
						a327810169
					
				
					 2 changed files with 2 additions and 2 deletions
				
			
		|  | @ -138,7 +138,7 @@ def maybe_run_command(statement: str) -> bool: | ||||||
| 
 | 
 | ||||||
|         return False |         return False | ||||||
| 
 | 
 | ||||||
|     while 1: |     while True: | ||||||
|         try: |         try: | ||||||
|             try: |             try: | ||||||
|                 sys.stdout.flush() |                 sys.stdout.flush() | ||||||
|  |  | ||||||
|  | @ -786,7 +786,7 @@ def __tputs(self, fmt, prog=delayprog): | ||||||
|         # only if the bps is actually needed (which I'm |         # only if the bps is actually needed (which I'm | ||||||
|         # betting is pretty unlkely) |         # betting is pretty unlkely) | ||||||
|         bps = ratedict.get(self.__svtermstate.ospeed) |         bps = ratedict.get(self.__svtermstate.ospeed) | ||||||
|         while 1: |         while True: | ||||||
|             m = prog.search(fmt) |             m = prog.search(fmt) | ||||||
|             if not m: |             if not m: | ||||||
|                 os.write(self.output_fd, fmt) |                 os.write(self.output_fd, fmt) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 RUANG (James Roy)
						RUANG (James Roy)