[Python-ideas] Where-statement (Proposal for function expressions)

Daniel Stutzbach daniel at stutzbachenterprises.com
Sun Jul 19 16:28:32 CEST 2009


On Sat, Jul 18, 2009 at 9:08 PM, Steven D'Aprano <steve at pearwood.info>wrote:

> > Yes, it does appear within the call.  The call is more than just the
> > parameters in parentheses.  It begins with "items.sort" and ends (in
> > this case) with then end of the "where" clause
>
> That's a definition of "within" that I'm not really happy with. And I
> think it's wrong. Consider the timing of calls:
>

I think we're arguing semantics there.  There are some reasonable
definitions of "within" where the "where" statement isn't within the call,
and other reasonable definitions of "within" where it after the call.
You've already given examples of the later.  Here's an example of the
former:

for i in range(5):
  x.append(some_function(i))

I think we can agree that the body of the "for" loop is within the "for"
statement?

--
Daniel Stutzbach, Ph.D.
President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20090719/821d4f59/attachment.html>


More information about the Python-ideas mailing list