]> granicus.if.org Git - python/commitdiff
Frozensets do not benefit from autoconversion.
authorRaymond Hettinger <python@rcn.com>
Thu, 8 May 2008 04:35:20 +0000 (04:35 +0000)
committerRaymond Hettinger <python@rcn.com>
Thu, 8 May 2008 04:35:20 +0000 (04:35 +0000)
Objects/setobject.c

index cc2c2ee8681964cd4a9d5ee2485aa01746f83f98..b379845d7a979f6bbddeea27b79d14597045cfb4 100644 (file)
@@ -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);