[Python-checkins] r45582 - python/trunk/Doc/whatsnew/whatsnew25.tex

andrew.kuchling python-checkins at python.org
Thu Apr 20 15:43:22 CEST 2006


Author: andrew.kuchling
Date: Thu Apr 20 15:43:21 2006
New Revision: 45582

Modified:
   python/trunk/Doc/whatsnew/whatsnew25.tex
Log:
Change a footnote to a parenthetical (in two senses) paragraph

Modified: python/trunk/Doc/whatsnew/whatsnew25.tex
==============================================================================
--- python/trunk/Doc/whatsnew/whatsnew25.tex	(original)
+++ python/trunk/Doc/whatsnew/whatsnew25.tex	Thu Apr 20 15:43:21 2006
@@ -452,11 +452,14 @@
 expression when you're doing something with the returned value, as in
 the above example.  The parentheses aren't always necessary, but it's
 easier to always add them instead of having to remember when they're
-needed.\footnote{The exact rules are that a \keyword{yield}-expression must
-always be parenthesized except when it occurs at the top-level
-expression on the right-hand side of an assignment, meaning you can
-write \code{val = yield i} but have to use parentheses when there's an
-operation, as in \code{val = (yield i) + 12}.}
+needed.
+
+(\pep{342} explains the exact rules, which are that a
+\keyword{yield}-expression must always be parenthesized except when it
+occurs at the top-level expression on the right-hand side of an
+assignment.  This means you can write \code{val = yield i} but have to
+use parentheses when there's an operation, as in \code{val = (yield i)
++ 12}.)
 
 Values are sent into a generator by calling its
 \method{send(\var{value})} method.  The generator's code is then


More information about the Python-checkins mailing list