[Yum-devel] RPMDBPackageSack cleanup

Jay Soffian jay-yum-devel at soffian.org
Wed Sep 13 11:39:31 UTC 2006


On Sep 11, 2006, at 5:44 PM, seth vidal wrote:

> so does writing it all in C and yet both of those things make it  
> harder
> and harder to read.
>
> I seriously cannot be the only person who thinks filters, lambdas and
> list comprehensions are harder to read, can I?

Comments from an lurker.

I've been working with Python since 1.5.2. Like all things, once you  
are used to the functional, er, functions, they are pretty clear.

If the code is non-obvious because you're not familiar with the  
operation of filter/lambda/etc then that's one thing. If it's non- 
obvious because too much has been crammed into a lambda function  
that's an entirely different matter.

In this case of the former, I think it's a mistake to not take  
advantage of language features that clearly improve performance. I  
also think it's an exaggeration to equate this with switching to C.

Putting a comment before the code block explaining its intent should  
be sufficient to offset the potential loss of clarity to Python  
programmers who don't use the language to its fullest.

Of course, I also program in Perl in addition to Python, so to me ...  
hrmm, I'll leave that discussion for another day. :-)

j.



More information about the Yum-devel mailing list