diff options
author | Raymond Hettinger <python@rcn.com> | 2008-02-12 19:05:36 +0000 |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2008-02-12 19:05:36 +0000 |
commit | a37430a0cec991f341ca637410371532c8e3720c (patch) | |
tree | 212f0d38dca36103e4a181f0b9504cd5f09f99d6 /Objects/setobject.c | |
parent | dad88dc15909843f1a9caf3edd9d0fb61f1ee0e4 (diff) | |
download | cpython-git-a37430a0cec991f341ca637410371532c8e3720c.tar.gz |
dict.copy() rises from the ashes. Revert r60687.
Diffstat (limited to 'Objects/setobject.c')
-rw-r--r-- | Objects/setobject.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/Objects/setobject.c b/Objects/setobject.c index 3869b3b6be..cc2c2ee868 100644 --- a/Objects/setobject.c +++ b/Objects/setobject.c @@ -1131,22 +1131,8 @@ set_copy(PySetObject *so) } static PyObject * -set_copy_method(PySetObject *so) -{ - if (Py_Py3kWarningFlag && - PyErr_Warn(PyExc_DeprecationWarning, - "set.copy() not supported in 3.x") < 0) - return NULL; - return make_new_set(Py_TYPE(so), (PyObject *)so); -} - -static PyObject * frozenset_copy(PySetObject *so) { - if (Py_Py3kWarningFlag && - PyErr_Warn(PyExc_DeprecationWarning, - "frozenset.copy() not supported in 3.x") < 0) - return NULL; if (PyFrozenSet_CheckExact(so)) { Py_INCREF(so); return (PyObject *)so; @@ -1925,7 +1911,7 @@ static PyMethodDef set_methods[] = { clear_doc}, {"__contains__",(PyCFunction)set_direct_contains, METH_O | METH_COEXIST, contains_doc}, - {"copy", (PyCFunction)set_copy_method, METH_NOARGS, + {"copy", (PyCFunction)set_copy, METH_NOARGS, copy_doc}, {"discard", (PyCFunction)set_discard, METH_O, discard_doc}, |