Message 287411 - Python tracker (original) (raw)

check_recursion_depth.py: script using Python functions and C function (functools.partial) to check the recursion depth.

Example with Python 3.6:

haypo@selma$ ./python check_recursion_depth.py # unpatched got: 148, expected: 100

haypo@selma$ ./python check_recursion_depth.py # patched got: 100, expected: 100

Maybe we need "proxies" in _testcapi for each kind of function, a function taking a callback and calling this function. Function types: