[New-bugs-announce] [issue41313] OverflowError still raised when int limited in sys.maxsize

wyz23x2 report at bugs.python.org
Thu Jul 16 03:47:19 EDT 2020


New submission from wyz23x2 <wyz23x2 at 163.com>:

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(sys.maxsize//2)
That is a big difference with at least 50%.

----------
components: C API, Library (Lib)
messages: 373747
nosy: wyz23x2
priority: normal
severity: normal
status: open
title: OverflowError still raised when int limited in sys.maxsize
versions: Python 3.10, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41313>
_______________________________________


More information about the New-bugs-announce mailing list