Summary of for...else threads

Folks, I have written a summary of the multiple issues raised by the two threads on for...else (attached). Unfortunately it's rather long, but there was a lot of ground to cover. I have tried to be as fair to all positions as I am able. If I have missed anything major, please feel free to comment, but please don't start debating the issues in this thread as well. If anyone feels I have misrepresented their position, please let me know. Unless there are serious objections, I intend to post this summary to python-dev in a couple of days and ask for a ruling on the various suggestions (e.g. Yes, No, Write A PEP And It Will Be Considered). For the record, is there anyone here willing to provide patches if one or more of the proposals are accepted on python-dev? Thank you for all who have contributed. -- Steven D'Aprano

Steven D'Aprano wrote:
1. Excellent summary! 2. After the discussions, my personal opinion has settled down as +1 on retaining the status quo (but welcoming doc patches), +0 on warning-if-no-break and -1 on the other options. 3. This should probably go in a PEP regardless of the reaction from python-dev. Rejected PEPs provide a good record of things we have deliberately decided *not* to do. Cheers, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia ---------------------------------------------------------------

Nick Coghlan wrote:
Having just seen Guido's latest post (i.e. he would omit the feature entirely if given the chance to redo the loop syntax and he's against adding a syntax warning), I'd suggest proposing a "Rejected PEP for the record" (with a link to Guido's post as the rejection). Regards, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia ---------------------------------------------------------------

Nick Coghlan schrieb:
Would an entry in PEP 3099 suffice? Georg -- Thus spake the Lord: Thou shalt indent with four spaces. No more, no less. Four shall be the number of spaces thou shalt indent, and the number of thy indenting shall be four. Eight shalt thou not indent, nor either indent thou two, excepting that thou then proceed to four. Tabs are right out.

Georg Brandl wrote: > Nick Coghlan schrieb: >> Nick Coghlan wrote: >>> Steven D'Aprano wrote: >>>> Unless there are serious objections, I intend to post this summary to >>>> python-dev in a couple of days and ask for a ruling on the various >>>> suggestions (e.g. Yes, No, Write A PEP And It Will Be Considered). >>> 1. Excellent summary! >>> 2. After the discussions, my personal opinion has settled down as +1 on >>> retaining the status quo (but welcoming doc patches), +0 on >>> warning-if-no-break and -1 on the other options. >>> 3. This should probably go in a PEP regardless of the reaction from >>> python-dev. Rejected PEPs provide a good record of things we have >>> deliberately decided *not* to do. >> Having just seen Guido's latest post (i.e. he would omit the feature >> entirely if given the chance to redo the loop syntax and he's against >> adding a syntax warning), I'd suggest proposing a "Rejected PEP for the >> record" (with a link to Guido's post as the rejection). > > Would an entry in PEP 3099 suffice? With links to Steven's summary and Guido's post? That would make sense (and save anyone the effort of formatting a PEP). Cheers, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia ---------------------------------------------------------------

It was a very complete summary indeed. Only 1 thing - I would have liked it if the buggy examples brought to this thread were noted as evidence on the "fix for..else" parts of the summary. I also think that the threads and summary should be linked to by a PEP (3099 would suffice). This isn't the first time fists were raised concerning for..else. 2008 - "for-else" - http://209.85.229.132/search?q=cache:AA6hSopNSIYJ:mail.python.org/pipermail/python-list/2008-March/652239.html+for+else+site:mail.python.org&cd=1&hl=en&ct=clnk 2003 - "[Tutor] for/else question" - http://mail.python.org/pipermail/tutor/2003-September/025274.html 2002 - "[Tutor] while else, for else" - http://mail.python.org/pipermail/tutor/2002-October/017855.html 2000 - "else clauses in while and for loops" - http://209.85.229.132/search?q=cache:7Y1eZ5uEXScJ:mail.python.org/pipermail/python-list/2000-April/031600.html+for+else+site:mail.python.org+blake&cd=4&hl=en&ct=clnk 2000 - "History question about for .. else" - http://209.85.229.132/search?q=cache:http://mail.python.org/pipermail/python... So I'm guessing we might be discussing this issue again come python 4000, --yuv

Steven D'Aprano wrote:
1. Excellent summary! 2. After the discussions, my personal opinion has settled down as +1 on retaining the status quo (but welcoming doc patches), +0 on warning-if-no-break and -1 on the other options. 3. This should probably go in a PEP regardless of the reaction from python-dev. Rejected PEPs provide a good record of things we have deliberately decided *not* to do. Cheers, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia ---------------------------------------------------------------

Nick Coghlan wrote:
Having just seen Guido's latest post (i.e. he would omit the feature entirely if given the chance to redo the loop syntax and he's against adding a syntax warning), I'd suggest proposing a "Rejected PEP for the record" (with a link to Guido's post as the rejection). Regards, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia ---------------------------------------------------------------

Nick Coghlan schrieb:
Would an entry in PEP 3099 suffice? Georg -- Thus spake the Lord: Thou shalt indent with four spaces. No more, no less. Four shall be the number of spaces thou shalt indent, and the number of thy indenting shall be four. Eight shalt thou not indent, nor either indent thou two, excepting that thou then proceed to four. Tabs are right out.

Georg Brandl wrote: > Nick Coghlan schrieb: >> Nick Coghlan wrote: >>> Steven D'Aprano wrote: >>>> Unless there are serious objections, I intend to post this summary to >>>> python-dev in a couple of days and ask for a ruling on the various >>>> suggestions (e.g. Yes, No, Write A PEP And It Will Be Considered). >>> 1. Excellent summary! >>> 2. After the discussions, my personal opinion has settled down as +1 on >>> retaining the status quo (but welcoming doc patches), +0 on >>> warning-if-no-break and -1 on the other options. >>> 3. This should probably go in a PEP regardless of the reaction from >>> python-dev. Rejected PEPs provide a good record of things we have >>> deliberately decided *not* to do. >> Having just seen Guido's latest post (i.e. he would omit the feature >> entirely if given the chance to redo the loop syntax and he's against >> adding a syntax warning), I'd suggest proposing a "Rejected PEP for the >> record" (with a link to Guido's post as the rejection). > > Would an entry in PEP 3099 suffice? With links to Steven's summary and Guido's post? That would make sense (and save anyone the effort of formatting a PEP). Cheers, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia ---------------------------------------------------------------

It was a very complete summary indeed. Only 1 thing - I would have liked it if the buggy examples brought to this thread were noted as evidence on the "fix for..else" parts of the summary. I also think that the threads and summary should be linked to by a PEP (3099 would suffice). This isn't the first time fists were raised concerning for..else. 2008 - "for-else" - http://209.85.229.132/search?q=cache:AA6hSopNSIYJ:mail.python.org/pipermail/python-list/2008-March/652239.html+for+else+site:mail.python.org&cd=1&hl=en&ct=clnk 2003 - "[Tutor] for/else question" - http://mail.python.org/pipermail/tutor/2003-September/025274.html 2002 - "[Tutor] while else, for else" - http://mail.python.org/pipermail/tutor/2002-October/017855.html 2000 - "else clauses in while and for loops" - http://209.85.229.132/search?q=cache:7Y1eZ5uEXScJ:mail.python.org/pipermail/python-list/2000-April/031600.html+for+else+site:mail.python.org+blake&cd=4&hl=en&ct=clnk 2000 - "History question about for .. else" - http://209.85.229.132/search?q=cache:http://mail.python.org/pipermail/python... So I'm guessing we might be discussing this issue again come python 4000, --yuv
participants (5)
-
Georg Brandl
-
Nick Coghlan
-
Stephen J. Turnbull
-
Steven D'Aprano
-
Yuvgoog Greenle