Kaydet (Commit) 8c0a2422 authored tarafından Barry Warsaw's avatar Barry Warsaw

PEP 214, Extended print Statement, has been accepted by the BDFL.

Document the extended print form.  Fred, please double check the
markup!
üst 23c9ec87
......@@ -330,6 +330,18 @@ exception is raised.
\withsubitem{(in module sys)}{\ttindex{stdout}}
\exindex{RuntimeError}
\keyword{print} also has an extended form, defined as
\begin{verbatim}
print_stmt: '>>' expression [ (',' expression)+ [','] ] )
\end{verbatim}
In this form, the first expression after the \keyword{>>} must
evaluate to a ``file-like'' object, specifically an object that has a
\method{write()} method as described above. With the extended form,
the subsequent expressions are printed to this file-like object
instead of \code{sys.stdout}.
\section{The \keyword{return} statement \label{return}}
\stindex{return}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment