Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit da62398

Browse files
committed
Correct description of BUILD_SLICE.
1 parent 6322112 commit da62398

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

Doc/lib/libdis.tex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -504,8 +504,8 @@ \subsection{Python Byte Code Instructions}
504504
\end{opcodedesc}
505505

506506
\begin{opcodedesc}{BUILD_SLICE}{argc}
507-
Pushes a slice object on the stack. If \var{argc} is three, creates
508-
\code{TOS3[TOS2:TOS1:TOS]}. Otherwise, expects three arguments.
507+
Pushes a slice object on the stack. \var{argc} must be 2 or 3. If it
508+
is 2, \code{slice(TOS1, TOS)} is pushed; if it is 3,
509+
\code{slice(TOS2, TOS1, TOS)} is pushed.
510+
See the \code{slice()} built-in function.
509511
\end{opcodedesc}
510-
511-

Doc/libdis.tex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -504,8 +504,8 @@ \subsection{Python Byte Code Instructions}
504504
\end{opcodedesc}
505505

506506
\begin{opcodedesc}{BUILD_SLICE}{argc}
507-
Pushes a slice object on the stack. If \var{argc} is three, creates
508-
\code{TOS3[TOS2:TOS1:TOS]}. Otherwise, expects three arguments.
507+
Pushes a slice object on the stack. \var{argc} must be 2 or 3. If it
508+
is 2, \code{slice(TOS1, TOS)} is pushed; if it is 3,
509+
\code{slice(TOS2, TOS1, TOS)} is pushed.
510+
See the \code{slice()} built-in function.
509511
\end{opcodedesc}
510-
511-

0 commit comments

Comments
 (0)