yield expression

Ian Kelly ian.g.kelly at gmail.com
Tue Feb 26 11:50:19 EST 2013


On Tue, Feb 26, 2013 at 9:34 AM, Colin J. Williams <cjw at ncf.ca> wrote:
> Perhaps it's becaoue (teild count) is a statement.  Statements do not return
> a value.

yield is a bit of an odd duck in that it's both a statement and an
expression.  Compare:

http://docs.python.org/3/reference/simple_stmts.html#the-yield-statement

http://docs.python.org/3/reference/expressions.html#yieldexpr



More information about the Python-list mailing list