mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	Frozensets do not benefit from autoconversion.
This commit is contained in:
		
							parent
							
								
									2e6407d813
								
							
						
					
					
						commit
						c5a1cc5c37
					
				
					 1 changed files with 3 additions and 3 deletions
				
			
		|  | @ -1755,7 +1755,7 @@ set_contains(PySetObject *so, PyObject *key) | |||
| 
 | ||||
| 	rv = set_contains_key(so, key); | ||||
| 	if (rv == -1) { | ||||
| 		if (!PyAnySet_Check(key) || !PyErr_ExceptionMatches(PyExc_TypeError)) | ||||
| 		if (!PySet_Check(key) || !PyErr_ExceptionMatches(PyExc_TypeError)) | ||||
| 			return -1; | ||||
| 		PyErr_Clear(); | ||||
| 		tmpkey = make_new_set(&PyFrozenSet_Type, NULL); | ||||
|  | @ -1790,7 +1790,7 @@ set_remove(PySetObject *so, PyObject *key) | |||
| 
 | ||||
| 	rv = set_discard_key(so, key); | ||||
| 	if (rv == -1) { | ||||
| 		if (!PyAnySet_Check(key) || !PyErr_ExceptionMatches(PyExc_TypeError)) | ||||
| 		if (!PySet_Check(key) || !PyErr_ExceptionMatches(PyExc_TypeError)) | ||||
| 			return NULL; | ||||
| 		PyErr_Clear(); | ||||
| 		tmpkey = make_new_set(&PyFrozenSet_Type, NULL); | ||||
|  | @ -1821,7 +1821,7 @@ set_discard(PySetObject *so, PyObject *key) | |||
| 
 | ||||
| 	rv = set_discard_key(so, key); | ||||
| 	if (rv == -1) { | ||||
| 		if (!PyAnySet_Check(key) || !PyErr_ExceptionMatches(PyExc_TypeError)) | ||||
| 		if (!PySet_Check(key) || !PyErr_ExceptionMatches(PyExc_TypeError)) | ||||
| 			return NULL; | ||||
| 		PyErr_Clear(); | ||||
| 		tmpkey = make_new_set(&PyFrozenSet_Type, NULL); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Raymond Hettinger
						Raymond Hettinger