Skip to content

Commit 6baf878

Browse files
authored
Make slice generic
1 parent 7e819ce commit 6baf878

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Objects/sliceobject.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,7 @@ static PyMethodDef slice_methods[] = {
560560
METH_O, slice_indices_doc},
561561
{"__reduce__", (PyCFunction)slice_reduce,
562562
METH_NOARGS, reduce_doc},
563+
{"__class_getitem__", Py_GenericAlias, METH_O|METH_CLASS, "See PEP 585"},
563564
{NULL, NULL}
564565
};
565566

0 commit comments

Comments
 (0)