diff Objects/setobject.c @ 43958:103b7f955036 legacy-trunk

Backport of _abccoll.py by Benjamin Arangueren, issue 1383. With some changes of my own thrown in (e.g. backport of r58107).
author Guido van Rossum <guido@python.org>
date Thu, 22 Nov 2007 00:55:51 +0000
parents b22f27e07011
children 26384b8180c7
line wrap: on
line diff
--- a/Objects/setobject.c	Wed Nov 21 02:50:06 2007 +0000
+++ b/Objects/setobject.c	Thu Nov 22 00:55:51 2007 +0000
@@ -789,13 +789,6 @@
 	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 @@
 	&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 */