Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Doc/library/dis.rst
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,12 @@ operation is being performed, so the intermediate analysis object isn't useful:
.. versionchanged:: 3.8
Added *jump* parameter.

.. versionchanged:: 3.13
If ``oparg`` is omitted (or ``None``), the stack effect is now returned
for ``oparg=0``. Previously this was an error for opcodes that use their
arg. It is also no longer an error to pass an integer ``oparg`` when
the ``opcode`` does not use it; the ``oparg`` in this case is ignored.


.. _bytecodes:

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
:func:`~dis.stack_effect`B no longer raises an exception if an ``oparg`` is
provided for an ``opcode`` that doesn't use its arg, or when it is not
provided for an ``opcode`` that does use it. In the latter case, the stack
effect is returned or ``oparg=0``.