<[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
>> Why not combine the two:
>
> I guess because (at least in source code) you're doing a loop twice
> :-). I don't know what a compiler would do. I think though that the
> "for i in c if test:" construct is more readable and maybe can even be
> better optimized.

 There are also the filter and ifilter functions:

for i in filter(testfunc, c):

tjr



-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to