[Python-Dev] anonymous blocks

Eric Nieuwland eric.nieuwland at xs4all.nl
Tue Apr 19 22:20:07 CEST 2005


Guido van Rossum wrote:
> tri = self.subcalculation("The quick brown fox jumps over the lazy 
> dog")
> self.disentangle(0x40, tri, self.indent+1)
>
> IMO this is clearer, and even shorter!
But it clutters the namespace with objects you don't need. So the 
complete equivalent would be more close to:
	tri = self.subcalculation("The quick brown fox jumps over the lazy 
dog")
	self.disentangle(0x40, tri, self.indent+1)
	del tri
which seems a bit odd to me.

> If we apply this to the anonymous block problem, we may end up finding
> lambda the ultimate compromise -- like a gentleman in the back of my
> talk last week at baypiggies observed (unfortunately I don't know his
> name).
It wasn't me ;-) It seems this keeps getting back at you. Wish I had 
thought of this argument before.

--eric



More information about the Python-Dev mailing list