mirror of
https://github.com/python/cpython.git
synced 2025-07-27 21:24:32 +00:00
Patch #2488: Add sys.maxsize.
This commit is contained in:
parent
b7e419ebb9
commit
4dd019fde3
3 changed files with 10 additions and 0 deletions
|
@ -992,6 +992,7 @@ PyDoc_STR(
|
|||
Static objects:\n\
|
||||
\n\
|
||||
maxint -- the largest supported integer (the smallest is -maxint-1)\n\
|
||||
maxsize -- the largest supported length of containers.\n\
|
||||
maxunicode -- the largest supported character\n\
|
||||
builtin_module_names -- tuple of module names built into this interpreter\n\
|
||||
version -- the version of this interpreter as a string\n\
|
||||
|
@ -1345,6 +1346,8 @@ _PySys_Init(void)
|
|||
PyString_FromString(Py_GetPrefix()));
|
||||
SET_SYS_FROM_STRING("exec_prefix",
|
||||
PyString_FromString(Py_GetExecPrefix()));
|
||||
SET_SYS_FROM_STRING("maxsize",
|
||||
PyInt_FromSsize_t(PY_SSIZE_T_MAX));
|
||||
SET_SYS_FROM_STRING("maxint",
|
||||
PyInt_FromLong(PyInt_GetMax()));
|
||||
SET_SYS_FROM_STRING("py3kwarning",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue