This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Wrong sentence in sys.exit.__doc__
Type: enhancement Stage: resolved
Components: Documentation Versions: Python 3.3, Python 3.4, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: ezio.melotti Nosy List: docs@python, ezio.melotti, marco.buttu, python-dev
Priority: normal Keywords:

Created on 2013-08-26 10:51 by marco.buttu, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (3)
msg196195 - (view) Author: Marco Buttu (marco.buttu) * Date: 2013-08-26 10:51
Python 3.3::

    >>> import sys
    >>> print(sys.exit.__doc__)
    exit([status])

    Exit the interpreter by raising SystemExit(status).
    If the status is omitted or None, it defaults to zero (i.e., success).
    If the status is numeric, it will be used as the system exit status.
    If it is another kind of object, it will be printed and the system
    exit status will be one (i.e., failure).

The sentence "If the status is numeric, it will be used as the system exit status."
is wrong::

    >>> sys.exit(3.33)
    3.33
    $ echo $?
    1


It should be "If the status is an *integer*, it will be used as the system exit status.",
as specified in the SystemExit `doc`.

.. doc: http://docs.python.org/3/library/exceptions.html#SystemExit
msg196197 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-08-26 11:01
New changeset 187a678c6033 by Ezio Melotti in branch '2.7':
#18839: document that sys.exit() will not accept a non-integer numeric value as exit status.
http://hg.python.org/cpython/rev/187a678c6033

New changeset 694e50a79638 by Ezio Melotti in branch '3.3':
#18839: document that sys.exit() will not accept a non-integer numeric value as exit status.
http://hg.python.org/cpython/rev/694e50a79638

New changeset 6cb3ae431bef by Ezio Melotti in branch 'default':
#18839: merge with 3.3.
http://hg.python.org/cpython/rev/6cb3ae431bef
msg196198 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2013-08-26 11:02
Fixed, thanks for the report!
History
Date User Action Args
2022-04-11 14:57:50adminsetgithub: 63039
2013-08-26 11:02:31ezio.melottisetstatus: open -> closed

type: behavior -> enhancement
assignee: docs@python -> ezio.melotti
versions: + Python 2.7, Python 3.3, Python 3.4
nosy: + ezio.melotti

messages: + msg196198
resolution: fixed
stage: resolved
2013-08-26 11:01:57python-devsetnosy: + python-dev
messages: + msg196197
2013-08-26 10:51:32marco.buttucreate