mirror of
https://github.com/python/cpython.git
synced 2025-11-01 10:45:30 +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
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue