summaryrefslogtreecommitdiff
path: root/Objects/setobject.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-11-22 00:55:51 +0000
committerGuido van Rossum <guido@python.org>2007-11-22 00:55:51 +0000
commit64c06e327d48150fc548cf18a4a7ae0b890e69fa (patch)
treedaf53ab57c369a3d92c5a9deafc41df2ccd96127 /Objects/setobject.c
parentcc7f26bf207ee17e2c1b3e6545e145942aff612d (diff)
downloadcpython-git-64c06e327d48150fc548cf18a4a7ae0b890e69fa.tar.gz
Backport of _abccoll.py by Benjamin Arangueren, issue 1383.
With some changes of my own thrown in (e.g. backport of r58107).
Diffstat (limited to 'Objects/setobject.c')
-rw-r--r--Objects/setobject.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/Objects/setobject.c b/Objects/setobject.c
index 3cbcd9ec8c..b049d09381 100644
--- a/Objects/setobject.c
+++ b/Objects/setobject.c
@@ -789,13 +789,6 @@ frozenset_hash(PyObject *self)
return hash;
}
-static long
-set_nohash(PyObject *self)
-{
- PyErr_SetString(PyExc_TypeError, "set objects are unhashable");
- return -1;
-}
-
/***** Set iterator type ***********************************************/
typedef struct {
@@ -2012,7 +2005,7 @@ PyTypeObject PySet_Type = {
&set_as_number, /* tp_as_number */
&set_as_sequence, /* tp_as_sequence */
0, /* tp_as_mapping */
- set_nohash, /* tp_hash */
+ 0, /* tp_hash */
0, /* tp_call */
0, /* tp_str */
PyObject_GenericGetAttr, /* tp_getattro */