The REALLY bad thing about Python lists ..

Remco Gerlich scarblac-spamtrap at pino.selwerd.nl
Sun May 14 13:37:56 EDT 2000


rturpin at my-deja.com wrote in comp.lang.python:
> And why should this be?  It isn't hard to write
> resizable vector code that is fast at both ends.
> There are lots of times when you want to manipulate
> a list from both ends. And Python syntax makes it
> easy:

I think it's *much* more common to append than to prepend. In fact, I can't
remember when I prepended to a list in Python (except as a special case of
adding something at some point in the list). Imho, adding extra space at the
beginning of lists is mostly a waste of space.

So I would find it interesting to know why you use prepending so much :)

-- 
Remco Gerlich,  scarblac at pino.selwerd.nl
  7:37pm  up 69 days,  7:51,  8 users,  load average: 0.26, 0.31, 0.38



More information about the Python-list mailing list