diff options
author | Georg Brandl <georg@python.org> | 2008-07-20 21:39:03 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2008-07-20 21:39:03 (GMT) |
commit | 5ac22308be9b0aa10cba6976f988c6c28d016644 (patch) | |
tree | 15d28f3542833f9e3dae15f9ab2755340a121673 /Doc | |
parent | dbdbf75983e57abfe4974ca790f352f878ab1360 (diff) | |
download | cpython-5ac22308be9b0aa10cba6976f988c6c28d016644.zip cpython-5ac22308be9b0aa10cba6976f988c6c28d016644.tar.gz cpython-5ac22308be9b0aa10cba6976f988c6c28d016644.tar.bz2 |
#3400: document new 3.0 opcodes.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/dis.rst | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/Doc/library/dis.rst b/Doc/library/dis.rst index bf991d7..12e7493 100644 --- a/Doc/library/dis.rst +++ b/Doc/library/dis.rst @@ -414,8 +414,8 @@ Miscellaneous opcodes. .. opcode:: LOAD_BUILD_CLASS () - Pushes builtins.__build_class__ onto the stack. It is later called by - ```CALL_FUNCTION`` to construct a class. + Pushes :func:`builtins.__build_class__` onto the stack. It is later called + by :opcode:`CALL_FUNCTION` to construct a class. .. opcode:: WITH_CLEANUP () @@ -440,6 +440,12 @@ Miscellaneous opcodes. .. XXX explain the WHY stuff! +.. opcode:: STORE_LOCALS + + Pops TOS from the stack and stores it as the current frame's ``f_locals``. + This is used in class construction. + + All of the following opcodes expect arguments. An argument is two bytes, with the more significant byte last. @@ -462,6 +468,18 @@ the more significant byte last. right-to-left. +.. opcode:: UNPACK_EX (counts) + + Implements assignment with a starred target: Unpacks an iterable in TOS into + individual values, where the total number of values can be smaller than the + number of items in the iterable: one the new values will be a list of all + leftover items. + + The low byte of *counts* is the number of values before the list value, the + high byte of *counts* the number of values after it. The resulting values + are put onto the stack right-to-left. + + .. opcode:: DUP_TOPX (count) Duplicate *count* items, keeping them in the same order. Due to implementation |