mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 21:51:50 +00:00 
			
		
		
		
	Use booleans.
This commit is contained in:
		
							parent
							
								
									d80d5f4ee8
								
							
						
					
					
						commit
						bd87d0862b
					
				
					 1 changed files with 3 additions and 3 deletions
				
			
		|  | @ -166,7 +166,7 @@ def values(self): | ||||||
|     def popitem(self): |     def popitem(self): | ||||||
|         if self._pending_removals: |         if self._pending_removals: | ||||||
|             self._commit_removals() |             self._commit_removals() | ||||||
|         while 1: |         while True: | ||||||
|             key, wr = self.data.popitem() |             key, wr = self.data.popitem() | ||||||
|             o = wr() |             o = wr() | ||||||
|             if o is not None: |             if o is not None: | ||||||
|  | @ -324,7 +324,7 @@ def __contains__(self, key): | ||||||
|         try: |         try: | ||||||
|             wr = ref(key) |             wr = ref(key) | ||||||
|         except TypeError: |         except TypeError: | ||||||
|             return 0 |             return False | ||||||
|         return wr in self.data |         return wr in self.data | ||||||
| 
 | 
 | ||||||
|     def items(self): |     def items(self): | ||||||
|  | @ -362,7 +362,7 @@ def keyrefs(self): | ||||||
|         return list(self.data) |         return list(self.data) | ||||||
| 
 | 
 | ||||||
|     def popitem(self): |     def popitem(self): | ||||||
|         while 1: |         while True: | ||||||
|             key, value = self.data.popitem() |             key, value = self.data.popitem() | ||||||
|             o = key() |             o = key() | ||||||
|             if o is not None: |             if o is not None: | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Georg Brandl
						Georg Brandl