File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -449,10 +449,7 @@ always available.
449
449
450
450
.. function :: exit([arg])
451
451
452
- Exit from Python. This is implemented by raising the :exc: `SystemExit `
453
- exception, so cleanup actions specified by finally clauses of :keyword: `try `
454
- statements are honored, and it is possible to intercept the exit attempt at
455
- an outer level.
452
+ Raise a :exc: `SystemExit ` exception, signaling an intention to exit the interpreter.
456
453
457
454
The optional argument *arg * can be an integer giving the exit status
458
455
(defaulting to zero), or another type of object. If it is an integer, zero
@@ -469,7 +466,8 @@ always available.
469
466
470
467
Since :func: `exit ` ultimately "only" raises an exception, it will only exit
471
468
the process when called from the main thread, and the exception is not
472
- intercepted.
469
+ intercepted. Cleanup actions specified by finally clauses of :keyword: `try ` statements
470
+ are honored, and it is possible to intercept the exit attempt at an outer level.
473
471
474
472
.. versionchanged :: 3.6
475
473
If an error occurs in the cleanup after the Python interpreter
You can’t perform that action at this time.
0 commit comments