[Python-ideas] for/else syntax
ubershmekel at gmail.com
Thu Oct 1 03:58:07 CEST 2009
I wouldn't modify the way for/else behaves btw. I would either:1. rename the
"else" to something else for "for" and "while" loops
2. remove the syntax altogether. 2to3 or 3to4 can do this by changing a
boolean before the "break" statement for example.
expectations of those unwilling to learn the language
I can tell you I love python and of course many newcomers will/do too. I'm
just noting that this might be a pimple worth popping.
One more thing, I have to clear django's name as it doesn't have a for/else
construct, it has a for/empty construct that was inspired by a popular
for/else django template recipe entitled:
> "for" template tag with support for "else" if array is empty
(thanks for pointing that out Karen)
On Thu, Oct 1, 2009 at 4:35 AM, alex23 <wuwei23 at gmail.com> wrote:
> On Oct 1, 11:07 am, Yuvgoog Greenle <ubershme... at gmail.com> wrote:
> > To make things worse, it's not that newcomers will say "hmm, what does
> > for/else thing do? lets look at the manual", they will mistakenly assume
> > they understand what the construct means.
> -1 for modifying Python to meet the "intuitive" expectations of those
> unwilling to learn the language.
> Python-ideas mailing list
> Python-ideas at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas