summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/dis.rst11
1 files changed, 10 insertions, 1 deletions
diff --git a/Doc/library/dis.rst b/Doc/library/dis.rst
index 9564937..fe9979d 100644
--- a/Doc/library/dis.rst
+++ b/Doc/library/dis.rst
@@ -248,12 +248,21 @@ operation is being performed, so the intermediate analysis object isn't useful:
return a list of these offsets.
-.. function:: stack_effect(opcode, [oparg])
+.. function:: stack_effect(opcode, oparg=None, *, jump=None)
Compute the stack effect of *opcode* with argument *oparg*.
+ If the code has a jump target and *jump* is ``True``, :func:`~stack_effect`
+ will return the stack effect of jumping. If *jump* is ``False``,
+ it will return the stack effect of not jumping. And if *jump* is
+ ``None`` (default), it will return the maximal stack effect of both cases.
+
.. versionadded:: 3.4
+ .. versionchanged:: 3.8
+ Added *jump* parameter.
+
+
.. _bytecodes:
Python Bytecode Instructions