Issue 23432: Duplicate content in SystemExit documentation (original) (raw)

This issue has been migrated to GitHub: https://github.com/python/cpython/issues/67620

classification

Title: Duplicate content in SystemExit documentation
Type: Stage: resolved
Components: Documentation Versions: Python 3.4, Python 3.5

process

Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: berker.peksag, docs@python, martin.panter, python-dev
Priority: normal Keywords: patch

Created on 2015-02-10 12:29 by berker.peksag, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
systemexit.diff berker.peksag,2015-02-10 12:29 review
systemexit_v2.diff berker.peksag,2015-03-07 06:59 review
Messages (8)
msg235684 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2015-02-10 12:29
From https://docs.python.org/3/library/exceptions.html#SystemExit Also, this exception derives directly from BaseException and not Exception, since it is not technically an error. and The exception inherits from BaseException instead of Exception so that it is not accidentally caught by code that catches Exception. This allows the exception to properly propagate up and cause the interpreter to exit. Here is a patch to remove the duplicate content and document the code attribute properly.
msg235711 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2015-02-10 21:47
The new text changes “the associated value” to “the value passed to [the] :func:`sys.exit` call”. There seems to be a trend in removing documentation of exception constructor arguments; is this intentional? In my code I tend to raise SystemExit() directly rather than importing the “sys” module and calling sys.exit().
msg235741 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2015-02-11 12:42
Good catch, thanks! Do you have better wording for that part of the patch?
msg235799 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2015-02-12 05:26
How about this: ''' The constructor accepts the same optional argument passed to :func:`sys.exit`. If the value is an integer, it specifies the system exit status . . . . . . .. attribute:: code The exit status or error message that is passed to the constructor. (Defaults to ``None``.) '''
msg237417 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2015-03-07 06:59
Thank you for your suggestion, Martin. Here is an updated patch.
msg237419 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2015-03-07 07:10
New patch looks fine
msg237762 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2015-03-10 12:46
New changeset 64c0b4aead0f by Berker Peksag in branch '3.4': Issue #23432: Remove duplicate content from SystemExit docs. https://hg.python.org/cpython/rev/64c0b4aead0f New changeset 5163fb8dc61f by Berker Peksag in branch 'default': Issue #23432: Remove duplicate content from SystemExit docs. https://hg.python.org/cpython/rev/5163fb8dc61f
msg237763 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2015-03-10 12:47
Thanks for the review, Martin.
History
Date User Action Args
2022-04-11 14:58:12 admin set github: 67620
2015-03-10 12:47:58 berker.peksag set status: open -> closedresolution: fixedmessages: + stage: patch review -> resolved
2015-03-10 12:46:51 python-dev set nosy: + python-devmessages: +
2015-03-07 07:10:54 martin.panter set messages: +
2015-03-07 06:59:55 berker.peksag set files: + systemexit_v2.diffmessages: +
2015-02-12 05:26:19 martin.panter set messages: +
2015-02-11 12:42:51 berker.peksag set messages: +
2015-02-10 21:47:17 martin.panter set nosy: + martin.pantermessages: +
2015-02-10 12:29:15 berker.peksag create