diff options
author | ram vikram singh <ramvikrams243@gmail.com> | 2022-11-13 19:41:23 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-13 19:41:23 (GMT) |
commit | 88385b856490a5ce3c99160bde6050638f81f72e (patch) | |
tree | e020f1630cf7d9f597fc280ccc9f724c32d8dc21 /Doc/library/signal.rst | |
parent | 343eb0f94b26f2a4c1c15505d417e8157ec19660 (diff) | |
download | cpython-88385b856490a5ce3c99160bde6050638f81f72e.zip cpython-88385b856490a5ce3c99160bde6050638f81f72e.tar.gz cpython-88385b856490a5ce3c99160bde6050638f81f72e.tar.bz2 |
gh-98930: improve the docstring of signal.strsignal (#99290)
Improves the docstring on signal.strsignal to make it explain when it returns a message, None, or when it raises ValueError.
Closes #98930
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Diffstat (limited to 'Doc/library/signal.rst')
-rw-r--r-- | Doc/library/signal.rst | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/library/signal.rst b/Doc/library/signal.rst index 2269f50..6cca760 100644 --- a/Doc/library/signal.rst +++ b/Doc/library/signal.rst @@ -362,9 +362,9 @@ The :mod:`signal` module defines the following functions: .. function:: strsignal(signalnum) - Return the system description of the signal *signalnum*, such as - "Interrupt", "Segmentation fault", etc. Returns :const:`None` if the signal - is not recognized. + Returns the description of signal *signalnum*, such as "Interrupt" + for :const:`SIGINT`. Returns :const:`None` if *signalnum* has no + description. Raises :exc:`ValueError` if *signalnum* is invalid. .. versionadded:: 3.8 |