bpo-6634: [doc] clarify that sys.exit() does not always exit the inte… · python/cpython@0981986 (original) (raw)
`@@ -412,10 +412,7 @@ always available.
`
412
412
``
413
413
`.. function:: exit([arg])
`
414
414
``
415
``
`` -
Exit from Python. This is implemented by raising the :exc:SystemExit
``
416
``
`` -
exception, so cleanup actions specified by finally clauses of :keyword:try
``
417
``
`-
statements are honored, and it is possible to intercept the exit attempt at
`
418
``
`-
an outer level.
`
``
415
`` +
Raise a :exc:SystemExit
exception, signaling an intention to exit the interpreter.
``
419
416
``
420
417
` The optional argument arg can be an integer giving the exit status
`
421
418
` (defaulting to zero), or another type of object. If it is an integer, zero
`
`@@ -432,7 +429,8 @@ always available.
`
432
429
``
433
430
`` Since :func:exit
ultimately "only" raises an exception, it will only exit
``
434
431
` the process when called from the main thread, and the exception is not
`
435
``
`-
intercepted.
`
``
432
`` +
intercepted. Cleanup actions specified by finally clauses of :keyword:try
statements
``
``
433
`+
are honored, and it is possible to intercept the exit attempt at an outer level.
`
436
434
``
437
435
` .. versionchanged:: 3.6
`
438
436
` If an error occurs in the cleanup after the Python interpreter
`