[issue41313] OverflowError still raised when int limited in sys.maxsize

2020-07-16 Thread Mark Dickinson
Mark Dickinson added the comment: 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 l

[issue41313] OverflowError still raised when int limited in sys.maxsize

2020-07-16 Thread wyz23x2
wyz23x2 added the comment: Tested. 2**31-31 is the max, which is 2147483617, compared to sys.maxsize's 9223372036854775807! -- type: -> behavior ___ Python tracker ___ _

[issue41313] OverflowError still raised when int limited in sys.maxsize

2020-07-16 Thread wyz23x2
wyz23x2 added the comment: Needs to add 10 zeros (sys.maxsize//100) to get it work. //200 doesn't work. Python version: 3.8.4 Platform: Windows 10 2004 -- ___ Python tracker

[issue41313] OverflowError still raised when int limited in sys.maxsize

2020-07-16 Thread wyz23x2
New submission from wyz23x2 : Consider this code: import sys sys.setrecursionlimit(sys.maxsize) Causes this: OverflowError: Python int too large to convert to C int So what is the limit? It should be sys.maxsize. These 2 also don't work: sys.setrecursionlimit(sys.maxsize-1) sys.setrecursionlimit