Skip to content

Commit c50f34d

Browse files
author
Marein Könings
authored
Fix: argument to exit is optional
[`exit` code is optional](https://docs.python.org/3/library/constants.html#exit) and [default is 0](https://docs.python.org/3/library/exceptions.html#SystemExit).
1 parent c731e05 commit c50f34d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,7 @@ In the default namespace you have access to various callables:
779779
``enumerate(seq, [start])`` Return iterator of index, item tuple pairs. Index begins at ``start`` or ``0`` (default)
780780
``eval(source, globals=None, locals=None)`` Run ``source`` (expression string or result of ``compile``) with globals and locals
781781
``exec(source, globals=None, locals=None)`` Run ``source`` (statement string or result of ``compile``) with globals and locals
782-
``exit(code)`` Exit Python interpreter and return code
782+
``exit([code])`` Exit Python interpreter and return code (default 0)
783783
``filter([function], seq)`` Return iterator of items where ``function(item)`` is truthy (or ``item`` is truthy if ``function`` is missing)
784784
``float(x)`` Convert string or number to float (call ``x.__float__()``)
785785
``format(obj, fmt)`` Format protocol (call ``obj.__format__(fmt)``)

0 commit comments

Comments
 (0)