[Python-checkins] CVS: python/dist/src/Doc/ref ref6.tex,1.29,1.30
Barry Warsaw
python-dev@python.org
Mon, 21 Aug 2000 08:45:19 -0700
Update of /cvsroot/python/python/dist/src/Doc/ref
In directory slayer.i.sourceforge.net:/tmp/cvs-serv24669
Modified Files:
ref6.tex
Log Message:
PEP 214, Extended print Statement, has been accepted by the BDFL.
Document the extended print form. Fred, please double check the
markup!
Index: ref6.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref6.tex,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -r1.29 -r1.30
*** ref6.tex 2000/08/19 20:55:01 1.29
--- ref6.tex 2000/08/21 15:45:16 1.30
***************
*** 331,334 ****
--- 331,346 ----
\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}