diff options
author | Guido van Rossum <guido@python.org> | 2007-11-22 00:55:51 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-11-22 00:55:51 (GMT) |
commit | 64c06e327d48150fc548cf18a4a7ae0b890e69fa (patch) | |
tree | daf53ab57c369a3d92c5a9deafc41df2ccd96127 /Objects/dictobject.c | |
parent | cc7f26bf207ee17e2c1b3e6545e145942aff612d (diff) | |
download | cpython-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/dictobject.c')
-rw-r--r-- | Objects/dictobject.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/Objects/dictobject.c b/Objects/dictobject.c index 978071b..bfb891c 100644 --- a/Objects/dictobject.c +++ b/Objects/dictobject.c @@ -2127,13 +2127,6 @@ dict_init(PyObject *self, PyObject *args, PyObject *kwds) return dict_update_common(self, args, kwds, "dict"); } -static long -dict_nohash(PyObject *self) -{ - PyErr_SetString(PyExc_TypeError, "dict objects are unhashable"); - return -1; -} - static PyObject * dict_iter(PyDictObject *dict) { @@ -2165,7 +2158,7 @@ PyTypeObject PyDict_Type = { 0, /* tp_as_number */ &dict_as_sequence, /* tp_as_sequence */ &dict_as_mapping, /* tp_as_mapping */ - dict_nohash, /* tp_hash */ + 0, /* tp_hash */ 0, /* tp_call */ 0, /* tp_str */ PyObject_GenericGetAttr, /* tp_getattro */ |