diff options
author | Brett Cannon <brettcannon@users.noreply.github.com> | 2017-03-10 22:44:48 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-10 22:44:48 (GMT) |
commit | 68c5e4c592495f1e0f4f60acb3483beb6aa87be1 (patch) | |
tree | db7efb749b77461ce166122ac0180d71ee8bb3f6 /Doc/library | |
parent | ff6f3716279e75b2519133a82b9de0c3601963d9 (diff) | |
download | cpython-68c5e4c592495f1e0f4f60acb3483beb6aa87be1.zip cpython-68c5e4c592495f1e0f4f60acb3483beb6aa87be1.tar.gz cpython-68c5e4c592495f1e0f4f60acb3483beb6aa87be1.tar.bz2 |
bpo-28810: Document BUILD_TUPLE_UNPACK_WITH_CALL bytecode (GH-605)
(cherry picked from commit 7e52c3e7aefb4cdaa0662fc01ff68a5e976b77ca)
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/dis.rst | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/Doc/library/dis.rst b/Doc/library/dis.rst index 1c1e1a2..686118f 100644 --- a/Doc/library/dis.rst +++ b/Doc/library/dis.rst @@ -807,6 +807,15 @@ All of the following opcodes use their arguments. .. versionadded:: 3.5 +.. opcode:: BUILD_TUPLE_UNPACK_WITH_CALL (count) + + This is similar to :opcode:`BUILD_TUPLE_UNPACK`, + but is used for ``f(*x, *y, *z)`` call syntax. The stack item at position + ``count + 1`` should be the corresponding callable ``f``. + + .. versionadded:: 3.6 + + .. opcode:: BUILD_LIST_UNPACK (count) This is similar to :opcode:`BUILD_TUPLE_UNPACK`, but pushes a list @@ -834,14 +843,16 @@ All of the following opcodes use their arguments. .. versionadded:: 3.5 -.. opcode:: BUILD_MAP_UNPACK_WITH_CALL (oparg) +.. opcode:: BUILD_MAP_UNPACK_WITH_CALL (count) This is similar to :opcode:`BUILD_MAP_UNPACK`, - but is used for ``f(**x, **y, **z)`` call syntax. The lowest byte of - *oparg* is the count of mappings, the relative position of the - corresponding callable ``f`` is encoded in the second byte of *oparg*. + but is used for ``f(**x, **y, **z)`` call syntax. The stack item at + position ``count + 2`` should be the corresponding callable ``f``. .. versionadded:: 3.5 + .. versionchanged:: 3.6 + The position of the callable is determined by adding 2 to the opcode + argument instead of encoding it in the second byte of the argument. .. opcode:: LOAD_ATTR (namei) |