Skip to content

Commit e1179a5

Browse files
mangrisanoezio-melotti
authored andcommitted
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.
1 parent 64e2c64 commit e1179a5

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
@@ -1113,9 +1113,13 @@ All of the following opcodes use their arguments.
11131113

11141114
.. opcode:: RAISE_VARARGS (argc)
11151115

1116-
Raises an exception. *argc* indicates the number of arguments to the raise
1117-
statement, ranging from 0 to 3. The handler will find the traceback as TOS2,
1118-
the parameter as TOS1, and the exception as TOS.
1116+
Raises an exception using one of the 3 forms of the ``raise`` statement,
1117+
depending on the value of *argc*:
1118+
1119+
* 0: ``raise`` (re-raise previous exception)
1120+
* 1: ``raise TOS`` (raise exception instance or type at ``TOS``)
1121+
* 2: ``raise TOS1 from TOS`` (raise exception instance or type at ``TOS1``
1122+
with ``__cause__`` set to ``TOS``)
11191123

11201124

11211125
.. opcode:: CALL_FUNCTION (argc)

0 commit comments

Comments
 (0)