Kaydet (Commit) c5a1cc5c authored tarafından Raymond Hettinger's avatar Raymond Hettinger

Frozensets do not benefit from autoconversion.

üst 2e6407d8
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment