mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 05:31:20 +00:00 
			
		
		
		
	One more use of ifilter()
This commit is contained in:
		
							parent
							
								
									a3a53180c0
								
							
						
					
					
						commit
						1ecfb73c26
					
				
					 1 changed files with 2 additions and 3 deletions
				
			
		|  | @ -436,8 +436,7 @@ def __isub__(self, other): | ||||||
|         """Remove all elements of another set from this set.""" |         """Remove all elements of another set from this set.""" | ||||||
|         self._binary_sanity_check(other) |         self._binary_sanity_check(other) | ||||||
|         data = self._data |         data = self._data | ||||||
|         for elt in other: |         for elt in ifilter(data.has_key, other): | ||||||
|             if elt in data: |  | ||||||
|             del data[elt] |             del data[elt] | ||||||
|         return self |         return self | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Raymond Hettinger
						Raymond Hettinger