Commits

Raymond Hettinger  committed 2ef1c38

Frozensets do not benefit from autoconversion.

  • Participants
  • Parent commits 9570bc1
  • Branches legacy-trunk

Comments (0)

Files changed (1)

File Objects/setobject.c

 
 	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);
 
 	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);
 
 	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);