summaryrefslogtreecommitdiffstats
path: root/Objects/listobject.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-11-22 00:55:51 (GMT)
committerGuido van Rossum <guido@python.org>2007-11-22 00:55:51 (GMT)
commit64c06e327d48150fc548cf18a4a7ae0b890e69fa (patch)
treedaf53ab57c369a3d92c5a9deafc41df2ccd96127 /Objects/listobject.c
parentcc7f26bf207ee17e2c1b3e6545e145942aff612d (diff)
downloadcpython-64c06e327d48150fc548cf18a4a7ae0b890e69fa.zip
cpython-64c06e327d48150fc548cf18a4a7ae0b890e69fa.tar.gz
cpython-64c06e327d48150fc548cf18a4a7ae0b890e69fa.tar.bz2
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/listobject.c')
-rw-r--r--Objects/listobject.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/Objects/listobject.c b/Objects/listobject.c
index fb5ce82..deb3ca5 100644
--- a/Objects/listobject.c
+++ b/Objects/listobject.c
@@ -2393,13 +2393,6 @@ list_init(PyListObject *self, PyObject *args, PyObject *kw)
return 0;
}
-static long
-list_nohash(PyObject *self)
-{
- PyErr_SetString(PyExc_TypeError, "list objects are unhashable");
- return -1;
-}
-
static PyObject *list_iter(PyObject *seq);
static PyObject *list_reversed(PyListObject* seq, PyObject* unused);
@@ -2694,7 +2687,7 @@ PyTypeObject PyList_Type = {
0, /* tp_as_number */
&list_as_sequence, /* tp_as_sequence */
&list_as_mapping, /* tp_as_mapping */
- list_nohash, /* tp_hash */
+ 0, /* tp_hash */
0, /* tp_call */
0, /* tp_str */
PyObject_GenericGetAttr, /* tp_getattro */
@@ -2959,4 +2952,3 @@ listreviter_len(listreviterobject *it)
return 0;
return len;
}
-