Describe the new PRINT_ITEM_TO and PRINT_NEWLINE_TO opcodes.

This commit is contained in:
Barry Warsaw 2000-08-21 17:19:00 +00:00
parent 203da6dfe4
commit 9087688581
1 changed files with 12 additions and 2 deletions

View File

@ -277,8 +277,13 @@ expression statement is terminated with \code{POP_STACK}.
\end{opcodedesc} \end{opcodedesc}
\begin{opcodedesc}{PRINT_ITEM}{} \begin{opcodedesc}{PRINT_ITEM}{}
Prints TOS. There is one such instruction for Prints TOS to the file-like object bound to \code{sys.stdout}. There
each item in the \keyword{print} statement. is one such instruction for each item in the \keyword{print} statement.
\end{opcodedesc}
\begin{opcodedesc}{PRINT_ITEM_TO}{}
Like \code{PRINT_ITEM}, but prints the item second from TOS to the
file-like object at TOS. This is used by the extended print statement.
\end{opcodedesc} \end{opcodedesc}
\begin{opcodedesc}{PRINT_NEWLINE}{} \begin{opcodedesc}{PRINT_NEWLINE}{}
@ -287,6 +292,11 @@ last operation of a \keyword{print} statement, unless the statement
ends with a comma. ends with a comma.
\end{opcodedesc} \end{opcodedesc}
\begin{opcodedesc}{PRINT_NEWLINE_TO}{}
Like \code{PRINT_NEWLINE}, but prints the new line on the file-like
object on the TOS. This is used by the extended print statement.
\end{opcodedesc}
\begin{opcodedesc}{BREAK_LOOP}{} \begin{opcodedesc}{BREAK_LOOP}{}
Terminates a loop due to a \keyword{break} statement. Terminates a loop due to a \keyword{break} statement.
\end{opcodedesc} \end{opcodedesc}