Message373751
The recursion depth and recursion limit are stored internally as C ints, so yes, 2**31 - 1 = 2147483647 is the maximum value that you can pass to `sys.setrecursionlimit` that won't fail immediately.
But it's unclear why you'd ever want to set the recursion limit that high. What's your goal here? Are you looking for a way to effectively disable that recursion limit altogether? If so, can you explain the use-case?
Note that the recursion limit is there to prevent your code from exhausting the C stack and segfaulting as a result: simply setting that limit to a huge value won't (by itself) allow you to run arbitrarily deeply nested recursions. On my machine, without the protection of the recursion limit, a simple recursive call segfaults at around a depth of 30800. |
|
Date |
User |
Action |
Args |
2020-07-16 08:17:57 | mark.dickinson | set | recipients:
+ mark.dickinson, wyz23x2 |
2020-07-16 08:17:57 | mark.dickinson | set | messageid: <1594887477.87.0.555612692321.issue41313@roundup.psfhosted.org> |
2020-07-16 08:17:57 | mark.dickinson | link | issue41313 messages |
2020-07-16 08:17:57 | mark.dickinson | create | |
|