The REALLY bad thing about Python lists ..

Courageous jkraska1 at san.rr.com
Tue May 16 10:17:55 EDT 2000


> http://www.deja.com/[ST_rn=ps]/getdoc.xp?AN=342411242&fmt=text
> 
> And I quote nearly fully "Blechh!  Creeping featurism!"

Well, to be honest, I was more surprised at the implementation
itself; ever since I can remember, I've never seen an allocation
in advance vector without it storing its own growth rate........
BTW, I missed what you meant by your generators comment. I fail
to see how this would be necessary if every list per se had a
growth_rate element attribute, although you'd think the more
necessary thing would be the initial size hint, actually. Albeit,
perhaps as the other poster noted, the realloc is making it
cheap most of the time.




C/



More information about the Python-list mailing list