[Python-ideas] Ruby-style Blocks in Python Idea

Terry Reedy tjreedy at udel.edu
Tue Mar 10 21:00:50 CET 2009


Stephen J. Turnbull wrote:
> Terry Reedy writes:
> 
>  > Like many other Pythonistas I recognize that that an uninformative stock 
>  > name of '<lambda>' is defective relative to an informative name that 
>  > points back to readable code.  What I dislike is the anonymity-cult 
>  > claim that the defect is a virtue.
> 
> That's unfair.

It is unfair to dislike false statements?
I think that *that* is unfair ;-)

> Python has "anonymous blocks" all over the place,
> since every control structure controls one or more of them.  It simply
> requires that they be forgotten at the next DEDENT.  Surely you don't
> advocate that each of them should get a name!

Surely, I did not.  And surely you cannot really think I suggested such.

Every expression and every statement or group of statements defines a 
function on the current namespaces, but I was talking about Python 
function objects.  And I never said that they necessarily should get an 
individual name (and indeed I went on to say that I too use 'f' and 'g' 
as stock, don't-care names) but only that I dislike the silly claim that 
being named '<lambda>' is a virtue.  And this was in the context you 
snipped of Aahz saying that some disliked the *use* of lambda 
expressions (as opposed to the promotion of their result as superior).

> I think this is a difference of cognition.

I do not think it a 'difference of cognition', in the usual sense of the 
term, to think that a more informative traceback is a teeny bit 
superior, and certainly not inferior, to a less informative traceback. 
Unless of course you mean that all disagreements are such.

Terry Jan Reedy




More information about the Python-ideas mailing list