mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 05:31:20 +00:00 
			
		
		
		
	Minor factoring.
This commit is contained in:
		
							parent
							
								
									a5cd6375c0
								
							
						
					
					
						commit
						1355a3dbf6
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -126,7 +126,7 @@ def popitem(self, last=True): | ||||||
|         ''' |         ''' | ||||||
|         if not self: |         if not self: | ||||||
|             raise KeyError('dictionary is empty') |             raise KeyError('dictionary is empty') | ||||||
|         key = next(reversed(self)) if last else next(iter(self)) |         key = next(reversed(self) if last else iter(self)) | ||||||
|         value = self.pop(key) |         value = self.pop(key) | ||||||
|         return key, value |         return key, value | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Raymond Hettinger
						Raymond Hettinger