diff options
author | Michele Angrisano <michele.angrisano@gmail.com> | 2019-06-02 21:34:12 (GMT) |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2019-06-02 21:34:12 (GMT) |
commit | e1179a5096fb12297ececd7a1c79969aa5747e28 (patch) | |
tree | 8ff0b2b30c4b6b7ffe63cdfc2e34108103960f43 | |
parent | 64e2c64f7f0111c52834155becc0c6134f9d8750 (diff) | |
download | cpython-e1179a5096fb12297ececd7a1c79969aa5747e28.zip cpython-e1179a5096fb12297ececd7a1c79969aa5747e28.tar.gz cpython-e1179a5096fb12297ececd7a1c79969aa5747e28.tar.bz2 |
bpo-19184: Update the documentation of dis module. (GH-13652)
* 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.
-rw-r--r-- | Doc/library/dis.rst | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Doc/library/dis.rst b/Doc/library/dis.rst index 060d4bb..15e707a 100644 --- a/Doc/library/dis.rst +++ b/Doc/library/dis.rst @@ -1113,9 +1113,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) |