mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
Backport of _abccoll.py by Benjamin Arangueren, issue 1383.
With some changes of my own thrown in (e.g. backport of r58107).
This commit is contained in:
parent
cc7f26bf20
commit
64c06e327d
13 changed files with 822 additions and 51 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue