PEP-308 a "simplicity-first" alternative

Dave Brueck dave at pythonapocrypha.com
Wed Feb 12 16:08:49 EST 2003


On Wed, 12 Feb 2003, Aahz wrote:

> In article <mailman.1045066910.29860.python-list at python.org>,
> Dave Brueck  <dave at pythonapocrypha.com> wrote:
> >On Wed, 12 Feb 2003, Tim Hochberg wrote:
> >>
> >> On the contrary, the question is whether to replace the current idiom
> >> _with_new_syntax_. Not adopting new syntax does not stand in the way of
> >> declaring the and/or idiom to be bad form and standardizing on a new
> >> idiom or idioms.
> >
> >Such as _______________? This topic has come up over and over for years
> >and nobody has come up with a better idiom than the one listed in the FAQ.
> >Unless a better one is discovered then the choice really is between
> >sticking with the old one or replacing it with new syntax. If you can
> >think up a better idiom, now would be an excellent time to suggest it.
>
> <sigh>  That's not the point.

Sure it is (unless you'd care to explain why not). You can even take it to
the extreme by noting that Guido would like to be done with this issue
once and for all, so a vote against new syntax is a vote in favor of
keeping the current idiom forever. Now I don't know if that is really the
case, but unless you or someone else suggests a real alternative, then it
really is a decision between continuing on as before or fixing the
problem.

>  Tell me, what's the idiom for
>
>     a = lambda x: print x

That question doesn't make sense. It's like asking, "what's the word for
'apple'?".

Are you really asking, "what's the idiom for statements in reusable
expressions?" or are you saying that, because you can't have statements in
lambdas you shouldn't be able to use logical operators to choose between
two things (like 'or') or that

a = lambda x: sys.stdout.write('%s\n' % x)

is too ugly or what? I'm interested in knowing what you mean, but not in
reading your mind.

-Dave





More information about the Python-list mailing list