Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 23d05c1

Browse filesBrowse files
committed
use helper hash unimplemented function
1 parent a2e7d9b commit 23d05c1
Copy full SHA for 23d05c1

File tree

Expand file treeCollapse file tree

1 file changed

+1
-8
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-8
lines changed

‎Objects/sliceobject.c

Copy file name to clipboardExpand all lines: Objects/sliceobject.c
+1-8Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -344,13 +344,6 @@ slice_richcompare(PyObject *v, PyObject *w, int op)
344344
return res;
345345
}
346346

347-
static long
348-
slice_hash(PySliceObject *v)
349-
{
350-
PyErr_SetString(PyExc_TypeError, "unhashable type");
351-
return -1L;
352-
}
353-
354347
PyTypeObject PySlice_Type = {
355348
PyVarObject_HEAD_INIT(&PyType_Type, 0)
356349
"slice", /* Name of this type */
@@ -365,7 +358,7 @@ PyTypeObject PySlice_Type = {
365358
0, /* tp_as_number */
366359
0, /* tp_as_sequence */
367360
0, /* tp_as_mapping */
368-
(hashfunc)slice_hash, /* tp_hash */
361+
PyObject_HashNotImplemented, /* tp_hash */
369362
0, /* tp_call */
370363
0, /* tp_str */
371364
PyObject_GenericGetAttr, /* tp_getattro */

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.