[Python-checkins] r62848 - python/trunk/Objects/setobject.c
raymond.hettinger
python-checkins at python.org
Thu May 8 06:35:20 CEST 2008
Author: raymond.hettinger
Date: Thu May 8 06:35:20 2008
New Revision: 62848
Log:
Frozensets do not benefit from autoconversion.
Modified:
python/trunk/Objects/setobject.c
Modified: python/trunk/Objects/setobject.c
==============================================================================
--- python/trunk/Objects/setobject.c (original)
+++ python/trunk/Objects/setobject.c Thu May 8 06:35:20 2008
@@ -1755,7 +1755,7 @@
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 @@
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 @@
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);
More information about the Python-checkins
mailing list