New submission from Marco Buttu:

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

----------
assignee: docs@python
components: Documentation
messages: 196195
nosy: docs@python, marco.buttu
priority: normal
severity: normal
status: open
title: Wrong sentence in sys.exit.__doc__
type: behavior

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue18839>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to