mirror of
				https://github.com/python/cpython.git
				synced 2025-11-04 07:31:38 +00:00 
			
		
		
		
	heappop(): Use "while True" instead of "while 1".
This commit is contained in:
		
							parent
							
								
									d2cf1ab0e2
								
							
						
					
					
						commit
						a0b3a00bc5
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -142,7 +142,7 @@ def heappop(heap):
 | 
				
			||||||
    returnitem = heap[0]
 | 
					    returnitem = heap[0]
 | 
				
			||||||
    item = heap.pop()
 | 
					    item = heap.pop()
 | 
				
			||||||
    pos = 0
 | 
					    pos = 0
 | 
				
			||||||
    while 1:
 | 
					    while True:
 | 
				
			||||||
        child2pos = (pos + 1) * 2
 | 
					        child2pos = (pos + 1) * 2
 | 
				
			||||||
        child1pos = child2pos - 1
 | 
					        child1pos = child2pos - 1
 | 
				
			||||||
        if child2pos < endpos:
 | 
					        if child2pos < endpos:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue