PEP 510: add missing parameters to check() to support keywords

This commit is contained in:
Victor Stinner 2016-01-11 03:02:32 +01:00
parent 402cb74efe
commit d59e5c14d1
1 changed files with 3 additions and 3 deletions

View File

@ -235,11 +235,11 @@ Changes
guards. It requires to implement a ``check()`` function, with an
optional ``first_check()`` function. API:
* ``int check(PyObject *guard, PyObject **stack)``: return 1 on
success, 0 if the guard failed temporarely, -1 if the guard will
always fail
* ``int first_check(PyObject *guard, PyObject *func)``: return 0 on
success, -1 if the guard will always fail
* ``int check(PyObject *guard, PyObject **stack, int na, int nk)``:
return 1 on success, 0 if the guard failed temporarely, -1 if the
guard will always fail
Microbenchmark on ``python3.6 -m timeit -s 'def f(): pass' 'f()'`` (best
of 3 runs):