diff options
Diffstat (limited to 'Python/ceval.c')
-rw-r--r-- | Python/ceval.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index e682fc1..8ee58f5 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -4917,6 +4917,13 @@ _PyEval_SliceIndex(PyObject *v, Py_ssize_t *pi) return 1; } +int +_PyEval_SliceIndexOrNone(PyObject *v, Py_ssize_t *pi) +{ + return v == Py_None || _PyEval_SliceIndex(v, pi); +} + + #define CANNOT_CATCH_MSG "catching classes that do not inherit from "\ "BaseException is not allowed" |