Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 318e621

Browse files
committed
Merge #6498 fix from 3.1.
2 parents 760155c + 0b2489e commit 318e621

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

Doc/c-api/veryhigh.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,12 @@ the same library that the Python runtime is using.
3434
according to the user's locale). It is important to note that the
3535
argument list may be modified (but the contents of the strings
3636
pointed to by the argument list are not). The return value will be
37-
the integer passed to the :func:`sys.exit` function, ``1`` if the
38-
interpreter exits due to an exception, or ``2`` if the parameter
39-
list does not represent a valid Python command line.
37+
```0``` if the interpreter exits normally (ie, without an
38+
exception), ``1`` if the interpreter exits due to an exception, or
39+
``2`` if the parameter list does not represent a valid Python
40+
command line.
4041
41-
Note that if an otherwise unhandled :exc:`SystemError` is raised, this
42+
Note that if an otherwise unhandled :exc:`SystemExit` is raised, this
4243
function will not return ``1``, but exit the process, as long as
4344
``Py_InspectFlag`` is not set.
4445
@@ -85,7 +86,7 @@ the same library that the Python runtime is using.
8586
there was an error, there is no way to get the exception information. For the
8687
meaning of *flags*, see below.
8788
88-
Note that if an otherwise unhandled :exc:`SystemError` is raised, this
89+
Note that if an otherwise unhandled :exc:`SystemExit` is raised, this
8990
function will not return ``-1``, but exit the process, as long as
9091
``Py_InspectFlag`` is not set.
9192

Python/pythonrun.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ int Py_DebugFlag; /* Needed by parser.c */
8080
int Py_VerboseFlag; /* Needed by import.c */
8181
int Py_QuietFlag; /* Needed by sysmodule.c */
8282
int Py_InteractiveFlag; /* Needed by Py_FdIsInteractive() below */
83-
int Py_InspectFlag; /* Needed to determine whether to exit at SystemError */
83+
int Py_InspectFlag; /* Needed to determine whether to exit at SystemExit */
8484
int Py_NoSiteFlag; /* Suppress 'import site' */
8585
int Py_BytesWarningFlag; /* Warn on str(bytes) and str(buffer) */
8686
int Py_DontWriteBytecodeFlag; /* Suppress writing bytecode files (*.py[co]) */

0 commit comments

Comments
 (0)