Needless copying in iterations?

BJörn Lindqvist bjourne at gmail.com
Mon Sep 17 00:44:14 EDT 2007


On 9/16/07, Steven D'Aprano <steve at remove-this-cybersource.com.au> wrote:
> Maybe I'm being unfair, but it seems to me that the attitude is similar:
> 'there's no point optimizing the common case of printing (say) ints
> stored in a list, Just In Case the programmer wants the incredibly rare
> case of setting sys.stdout to some wacky object that modifies the list
> he's iterating over. It could happen.'

Indeed, there is no point in optimizing printing of lists as IO is
orders of magnitudes slower than Python.

But psyco probably would make a best effort attempt.

-- 
mvh Björn



More information about the Python-list mailing list