We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a2e7d9b commit 23d05c1Copy full SHA for 23d05c1
Objects/sliceobject.c
@@ -344,13 +344,6 @@ slice_richcompare(PyObject *v, PyObject *w, int op)
344
return res;
345
}
346
347
-static long
348
-slice_hash(PySliceObject *v)
349
-{
350
- PyErr_SetString(PyExc_TypeError, "unhashable type");
351
- return -1L;
352
-}
353
-
354
PyTypeObject PySlice_Type = {
355
PyVarObject_HEAD_INIT(&PyType_Type, 0)
356
"slice", /* Name of this type */
@@ -365,7 +358,7 @@ PyTypeObject PySlice_Type = {
365
358
0, /* tp_as_number */
366
359
0, /* tp_as_sequence */
367
360
0, /* tp_as_mapping */
368
- (hashfunc)slice_hash, /* tp_hash */
361
+ PyObject_HashNotImplemented, /* tp_hash */
369
362
0, /* tp_call */
370
363
0, /* tp_str */
371
364
PyObject_GenericGetAttr, /* tp_getattro */
0 commit comments