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