In article <mailman.3616.1248369685.8015.python-l...@python.org>, Mark Lawrence <breamore...@yahoo.co.uk> wrote: > >Sorry if this has been discussed and I've missed it, but how about >memory allocation. An immutable tuple has a fixed memory allocation >whereas that for the mutable list must be liable to change. You might >like to look at the recent thread on this ng 'List insertion cost' and >follow the links to Raymond Hettinger's power point presentation.
Not only that, but lists use more memory, period, for any given number of elements because the overallocation permits amortized constant time for appends. -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ "At Resolver we've found it useful to short-circuit any doubt and just refer to comments in code as 'lies'. :-)" --Michael Foord paraphrases Christian Muirhead on python-dev, 2009-03-22 -- http://mail.python.org/mailman/listinfo/python-list