diff options
author | Barry Warsaw <barry@python.org> | 2000-08-21 15:45:16 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 2000-08-21 15:45:16 (GMT) |
commit | 8c0a242289d0da855ec10c763cc2020954da1184 (patch) | |
tree | e53db9bde27ed60edfa00530ecd53700cf34fc90 | |
parent | 23c9ec87cf8b1b2da203bf06c230d85698db9206 (diff) | |
download | cpython-8c0a242289d0da855ec10c763cc2020954da1184.zip cpython-8c0a242289d0da855ec10c763cc2020954da1184.tar.gz cpython-8c0a242289d0da855ec10c763cc2020954da1184.tar.bz2 |
PEP 214, Extended print Statement, has been accepted by the BDFL.
Document the extended print form. Fred, please double check the
markup!
-rw-r--r-- | Doc/ref/ref6.tex | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Doc/ref/ref6.tex b/Doc/ref/ref6.tex index 3f21479..1821485 100644 --- a/Doc/ref/ref6.tex +++ b/Doc/ref/ref6.tex @@ -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} |