mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	The filter() function does support a None argument in Py3.0.
This commit is contained in:
		
							parent
							
								
									05387861ea
								
							
						
					
					
						commit
						10dca6e282
					
				
					 3 changed files with 0 additions and 27 deletions
				
			
		|  | @ -296,13 +296,6 @@ builtin_filter(PyObject *self, PyObject *args) | |||
| 		} | ||||
| 
 | ||||
| 		if (func == (PyObject *)&PyBool_Type || func == Py_None) { | ||||
| 			if (Py_Py3kWarningFlag && | ||||
| 			    PyErr_Warn(PyExc_DeprecationWarning, | ||||
| 				       "filter with None as a first argument " | ||||
| 				       "is not supported in 3.x.  Use a list " | ||||
| 				       "comprehension instead.") < 0) | ||||
| 				return NULL; | ||||
| 
 | ||||
| 			ok = PyObject_IsTrue(item); | ||||
| 		} | ||||
| 		else { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Raymond Hettinger
						Raymond Hettinger