--- On Wed, 1/27/10, Daniel Stutzbach <dan...@stutzbachenterprises.com> wrote:
> From: Daniel Stutzbach <dan...@stutzbachenterprises.com> > Subject: Re: [Python-Dev] patch to make list.pop(0) work in O(1) time > To: "Steve Howell" <showel...@yahoo.com> > Cc: "John Arbash Meinel" <john.arbash.mei...@gmail.com>, python-dev@python.org > Date: Wednesday, January 27, 2010, 8:20 AM > On Wed, Jan 27, > 2010 at 9:55 AM, Steve Howell <showel...@yahoo.com> > wrote: > > > Fair enough, but that's still wasteful of memory, > keeping around a bunch of None elements because you > can't inexpensively delete them. > > Even if there are many references to it, there is only one > None element. > I should have been more precise and said the pointers to None, which could be reclaimed. But that's a pretty minor savings--I concede on the greater point, you do have the alternative to break dangling references with None, so the expense of avoiding remove operations is only local to list itself. _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com