From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Sun, 30 Jul 2023 15:49:26 +0000 (-0700) Subject: [3.12] gh-107427: Update the description of UNPACK_SEQUENCE (gh-107429) (gh-107459) X-Git-Tag: v3.12.0rc1~30 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0b3d6381757a6616fdf093a2ba99cc68c018b845;p=thirdparty%2FPython%2Fcpython.git [3.12] gh-107427: Update the description of UNPACK_SEQUENCE (gh-107429) (gh-107459) --- diff --git a/Doc/library/dis.rst b/Doc/library/dis.rst index 97d5121c4e8a..085fd2baba55 100644 --- a/Doc/library/dis.rst +++ b/Doc/library/dis.rst @@ -864,9 +864,10 @@ iterations of the loop. .. opcode:: UNPACK_SEQUENCE (count) Unpacks ``STACK[-1]`` into *count* individual values, which are put onto the stack - right-to-left:: + right-to-left. Require there to be exactly *count* values.:: - STACK.extend(STACK.pop()[:count:-1]) + assert(len(STACK[-1]) == count) + STACK.extend(STACK.pop()[:-count-1:-1]) .. opcode:: UNPACK_EX (counts)