Re: [Python-Dev] Python Library Addition: First-class Procedure Signatures

2007-11-16 Thread Brett Cannon
On Nov 15, 2007 12:48 PM, Steven Bethard <[EMAIL PROTECTED]> wrote: > On Nov 14, 2007 1:18 PM, Brett Cannon <[EMAIL PROTECTED]> wrote: > > On Nov 14, 2007 10:30 AM, Isaac Morland <[EMAIL PROTECTED]> wrote: > > > So I wrote a Signature class. Instances of the class represent all the > > > informati

Re: [Python-Dev] for loop with if filter

2007-11-16 Thread Tristan Seligmann
* Terry Reedy <[EMAIL PROTECTED]> [2007-11-16 18:31:12 -0500]: > > "Gustavo Carneiro" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > |I am finding myself often doing for loops over a subset of a list, like: > | > |for r in results: > |if r.numNodes != numNode

Re: [Python-Dev] for loop with if filter

2007-11-16 Thread Terry Reedy
"Gustavo Carneiro" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] |I am finding myself often doing for loops over a subset of a list, like: | |for r in results: |if r.numNodes != numNodes: |continue |# do something with r Why write it

Re: [Python-Dev] Python Library Addition: First-class Procedure Signatures

2007-11-16 Thread Brett Cannon
On Nov 15, 2007 12:48 PM, Steven Bethard <[EMAIL PROTECTED]> wrote: > On Nov 14, 2007 1:18 PM, Brett Cannon <[EMAIL PROTECTED]> wrote: > > On Nov 14, 2007 10:30 AM, Isaac Morland <[EMAIL PROTECTED]> wrote: > > > So I wrote a Signature class. Instances of the class represent all the > > > informati

[Python-Dev] Summary of Tracker Issues

2007-11-16 Thread Tracker
ACTIVITY SUMMARY (11/09/07 - 11/16/07) Tracker at http://bugs.python.org/ To view or respond to any of the issues listed below, click on the issue number. Do NOT respond to this message. 1323 open (+13) / 11612 closed (+25) / 12935 total (+38) Open issues with patches: 418 Average durati

Re: [Python-Dev] for loop with if filter

2007-11-16 Thread martin
I started thinking about itertools when I saw this then I realised that your question was about changing the syntax to produce fewer lines of code rather than writing more effiicient code.. seemed like a case where you could use ifilter. //Martin are talking about cvhanging the syntax rQu

Re: [Python-Dev] for loop with if filter

2007-11-16 Thread Paul Moore
On 16/11/2007, Gustavo Carneiro <[EMAIL PROTECTED]> wrote: > Yes, I can do that, as well as I can use the 'continue' statement, but both > versions are slightly more verbose and less clear than what I propose. This should go to python-ideas, I guess. (FWIW, I can see the attraction of the idea, bu

Re: [Python-Dev] for loop with if filter

2007-11-16 Thread Facundo Batista
2007/11/16, Gustavo Carneiro <[EMAIL PROTECTED]>: > Yes, I can do that, as well as I can use the 'continue' statement, but both > versions are slightly more verbose and less clear than what I propose. The question is: is this slightly more verbosity and less clarity worth enough as to make a synt

Re: [Python-Dev] for loop with if filter

2007-11-16 Thread Gustavo Carneiro
On 16/11/2007, Benji York <[EMAIL PROTECTED]> wrote: > > Gustavo Carneiro wrote: > > I am finding myself often doing for loops over a subset of a list, like: > > > > for r in results: > > if r.numNodes != numNodes: > > continue > > # do something with

Re: [Python-Dev] for loop with if filter

2007-11-16 Thread Benji York
Gustavo Carneiro wrote: > I am finding myself often doing for loops over a subset of a list, like: > > for r in results: > if r.numNodes != numNodes: > continue > # do something with r > > It would be nice if the plain for loop was as flexible

[Python-Dev] for loop with if filter

2007-11-16 Thread Gustavo Carneiro
I am finding myself often doing for loops over a subset of a list, like: for r in results: if r.numNodes != numNodes: continue # do something with r It would be nice if the plain for loop was as flexible as list comprehensions and allowed an optiona