Path: csiph.com!usenet.pasdenom.info!gegeweb.org!usenet-fr.net!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.057 X-Spam-Evidence: '*H*': 0.89; '*S*': 0.00; 'value.': 0.15; 'count)': 0.16; 'expression.': 0.16; 'statement.': 0.16; 'subject:expression': 0.16; 'subject:yield': 0.16; 'wrote:': 0.17; 'odd': 0.17; 'yield': 0.17; 'feb': 0.19; 'bit': 0.21; 'statement': 0.23; 'header:In-Reply-To:1': 0.25; 'am,': 0.27; 'message- id:@mail.gmail.com': 0.27; 'statements': 0.29; 'url:python': 0.32; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'received:209.85': 0.35; 'url:org': 0.36; 'received:209': 0.37; 'subject:: ': 0.38; 'url:docs': 0.38; 'to:addr:python.org': 0.39; '26,': 0.65; '2013': 0.84; 'compare:': 0.84; 'to:name:python': 0.84; 'url:reference': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=fa8V8BP2YGhgUyD019CRvDTqiMY2LFm0YIwVDEfjK/k=; b=U9gwZHK6U4XlV8Fe9FSfFY9RP9smRgcB3rbcTr4UWkuOQf/J7QvMIFQr54Zv/1QpXm YUjEnXtphcOKwPccduyEba3atXBITgCj7rSiEwkRCjg+q0otKxMpnM1yUL8q02v8jruD PSeFIkD59qIJzb1vIgL98/W60apbW4AVtnDdZH3UQT3jCvhYELM9y7FmGfiE8sYxda31 DP6PtUfftsblsnptDCOXwXOkEfzv66tOpJXWvWevicOCSfZVqerPlxilKIw72oDE5AQa iyEPwxQsGXY3r+Ug4s3+3bD97huxjD9ea1vxJPKJTTuAmespAZD2GV6oTjSP0vOliZc6 bzpg== X-Received: by 10.58.196.170 with SMTP id in10mr680159vec.37.1361897459975; Tue, 26 Feb 2013 08:50:59 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: From: Ian Kelly Date: Tue, 26 Feb 2013 09:50:19 -0700 Subject: Re: yield expression To: Python Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 10 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1361897462 news.xs4all.nl 6885 [2001:888:2000:d::a6]:46211 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:39969 On Tue, Feb 26, 2013 at 9:34 AM, Colin J. Williams 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