Skip to content

Commit 9390e98

Browse files
miss-islingtonmangrisano
authored andcommitted
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 e1179a5) Co-authored-by: Michele Angrisano <[email protected]>
1 parent 6bd438e commit 9390e98

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

Doc/library/dis.rst

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,9 +1059,13 @@ All of the following opcodes use their arguments.
10591059

10601060
.. opcode:: RAISE_VARARGS (argc)
10611061

1062-
Raises an exception. *argc* indicates the number of arguments to the raise
1063-
statement, ranging from 0 to 3. The handler will find the traceback as TOS2,
1064-
the parameter as TOS1, and the exception as TOS.
1062+
Raises an exception using one of the 3 forms of the ``raise`` statement,
1063+
depending on the value of *argc*:
1064+
1065+
* 0: ``raise`` (re-raise previous exception)
1066+
* 1: ``raise TOS`` (raise exception instance or type at ``TOS``)
1067+
* 2: ``raise TOS1 from TOS`` (raise exception instance or type at ``TOS1``
1068+
with ``__cause__`` set to ``TOS``)
10651069

10661070

10671071
.. opcode:: CALL_FUNCTION (argc)

0 commit comments

Comments
 (0)