@@ -492,17 +492,8 @@ Initializing and finalizing the interpreter
492
492
strings other than those passed in (however, the contents of the strings
493
493
pointed to by the argument list are not modified).
494
494
495
- The return value will be ``0`` if the interpreter exits normally (i.e.,
496
- without an exception), ``1`` if the interpreter exits due to an exception,
497
- or ``2`` if the argument list does not represent a valid Python command
498
- line.
499
-
500
- Note that if an otherwise unhandled :exc:`SystemExit` is raised, this
501
- function will not return ``1``, but exit the process, as long as
502
- ``Py_InspectFlag`` is not set. If ``Py_InspectFlag`` is set, execution will
503
- drop into the interactive Python prompt, at which point a second otherwise
504
- unhandled :exc:`SystemExit` will still exit the process, while any other
505
- means of exiting will set the return value as described above.
495
+ The return value is ``2`` if the argument list does not represent a valid
496
+ Python command line, and otherwise the same as :c:func:`Py_RunMain`.
506
497
507
498
In terms of the CPython runtime configuration APIs documented in the
508
499
:ref:`runtime configuration <init-config>` section (and without accounting
@@ -539,8 +530,8 @@ Initializing and finalizing the interpreter
539
530
540
531
If :c:member:`PyConfig.inspect` is not set (the default), the return value
541
532
will be ``0`` if the interpreter exits normally (that is, without raising
542
- an exception), the corresponding exit status if there was an unhandled
543
- :exc:`SystemExit`, or ``1`` for any other unhandled exception.
533
+ an exception), the exit status of an unhandled :exc:`SystemExit`, or ``1``
534
+ for any other unhandled exception.
544
535
545
536
If :c:member:`PyConfig.inspect` is set (such as when the :option: `-i ` option
546
537
is used), rather than returning when the interpreter exits, execution will
0 commit comments