mirror of
https://github.com/python/cpython.git
synced 2025-08-25 03:04:55 +00:00
bpo-29748: Added the slice index converter in Argument Clinic. (#549)
This commit is contained in:
parent
a5af6e1af7
commit
80ec8364f1
5 changed files with 25 additions and 3 deletions
|
@ -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"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue