On Dec 17, 9:37 am, Carlos Grohmann <carlos.grohm...@gmail.com> wrote:
> Tenting the time spent by each approach (using time.clock()), with a
> file with about 100,000 entries, I get 0.03s for the loop and 0.05s
> for the listcomp.
>
> thoughts?

You shouldn't trust your intuition in things like this.  Some features
were added to Python to make writing easier, not to make it run
faster.  This time your intuition was correct.  Next time, who knows?


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

Reply via email to