[Python-checkins] bpo-19184: Update the documentation of dis module. (GH-13652) (GH-13755)
Ezio Melotti
webhook-mailer at python.org
Sun Jun 2 19:18:54 EDT 2019
https://github.com/python/cpython/commit/9390e98c3ed9eb9fa414030a2feec1926193af94
commit: 9390e98c3ed9eb9fa414030a2feec1926193af94
branch: 3.7
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: Ezio Melotti <ezio.melotti at gmail.com>
date: 2019-06-03T01:18:50+02:00
summary:
bpo-19184: Update the documentation of dis module. (GH-13652) (GH-13755)
* bpo-19184: Update the documentation of dis module
* Explain the behavior of the number of arguments of RAISE_VARGARGS
opcode.
* bpo-19184: Update blurb.
* bpo-19184: Fix typo in the dis Documentation.
* bpo-19184: Address review comments and improve the doc
* bpo-19184: Remove news file.
(cherry picked from commit e1179a5096fb12297ececd7a1c79969aa5747e28)
Co-authored-by: Michele Angrisano <michele.angrisano at gmail.com>
files:
M Doc/library/dis.rst
diff --git a/Doc/library/dis.rst b/Doc/library/dis.rst
index 6bbef3844de5..b8cf4463d935 100644
--- a/Doc/library/dis.rst
+++ b/Doc/library/dis.rst
@@ -1059,9 +1059,13 @@ All of the following opcodes use their arguments.
.. opcode:: RAISE_VARARGS (argc)
- Raises an exception. *argc* indicates the number of arguments to the raise
- statement, ranging from 0 to 3. The handler will find the traceback as TOS2,
- the parameter as TOS1, and the exception as TOS.
+ Raises an exception using one of the 3 forms of the ``raise`` statement,
+ depending on the value of *argc*:
+
+ * 0: ``raise`` (re-raise previous exception)
+ * 1: ``raise TOS`` (raise exception instance or type at ``TOS``)
+ * 2: ``raise TOS1 from TOS`` (raise exception instance or type at ``TOS1``
+ with ``__cause__`` set to ``TOS``)
.. opcode:: CALL_FUNCTION (argc)
More information about the Python-checkins
mailing list