]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Revert 53667
authorRaymond Hettinger <python@rcn.com>
Wed, 18 Apr 2007 02:02:15 +0000 (02:02 +0000)
committerRaymond Hettinger <python@rcn.com>
Wed, 18 Apr 2007 02:02:15 +0000 (02:02 +0000)
Misc/NEWS
Objects/setobject.c

index bd76c87937b7ed2e01cf411ce9725044b70f9329..9a13da67a1434b0d58e46a02038f0217cfbd65fb 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -14,6 +14,7 @@ Core and builtins
 
 - Revert SF #1615701: dict.update() does *not* call __getitem__() or keys()
   if subclassed.  This is to remain consistent with 2.5.
+  Also revert revision 53667 with made a similar change to set.update().
 
 
 What's New in Python 2.5.1c1?
index a896d937faec3046179dc5323534953a25768483..b336fba7a884fc13af2eb112a8ab1748c3bc5f6c 100644 (file)
@@ -912,7 +912,7 @@ set_update_internal(PySetObject *so, PyObject *other)
 {
        PyObject *key, *it;
 
-       if (PyAnySet_CheckExact(other))
+       if (PyAnySet_Check(other))
                return set_merge(so, other);
 
        if (PyDict_CheckExact(other)) {
@@ -1207,7 +1207,7 @@ set_intersection(PySetObject *so, PyObject *other)
        if (result == NULL)
                return NULL;
 
-       if (PyAnySet_CheckExact(other)) {               
+       if (PyAnySet_Check(other)) {            
                Py_ssize_t pos = 0;
                setentry *entry;
 
@@ -1331,7 +1331,7 @@ set_difference_update_internal(PySetObject *so, PyObject *other)
        if ((PyObject *)so == other)
                return set_clear_internal(so);
        
-       if (PyAnySet_CheckExact(other)) {
+       if (PyAnySet_Check(other)) {
                setentry *entry;
                Py_ssize_t pos = 0;
 
@@ -1380,7 +1380,7 @@ set_difference(PySetObject *so, PyObject *other)
        setentry *entry;
        Py_ssize_t pos = 0;
 
-       if (!PyAnySet_CheckExact(other)  && !PyDict_CheckExact(other)) {
+       if (!PyAnySet_Check(other)  && !PyDict_CheckExact(other)) {
                result = set_copy(so);
                if (result == NULL)
                        return NULL;
@@ -1487,7 +1487,7 @@ set_symmetric_difference_update(PySetObject *so, PyObject *other)
                Py_RETURN_NONE;
        }
 
-       if (PyAnySet_CheckExact(other)) {
+       if (PyAnySet_Check(other)) {
                Py_INCREF(other);
                otherset = (PySetObject *)other;
        } else {
@@ -1570,7 +1570,7 @@ set_issubset(PySetObject *so, PyObject *other)
        setentry *entry;
        Py_ssize_t pos = 0;
 
-       if (!PyAnySet_CheckExact(other)) {
+       if (!PyAnySet_Check(other)) {
                PyObject *tmp, *result;
                tmp = make_new_set(&PySet_Type, other);
                if (tmp == NULL)
@@ -1599,7 +1599,7 @@ set_issuperset(PySetObject *so, PyObject *other)
 {
        PyObject *tmp, *result;
 
-       if (!PyAnySet_CheckExact(other)) {
+       if (!PyAnySet_Check(other)) {
                tmp = make_new_set(&PySet_Type, other);
                if (tmp == NULL)
                        return NULL;