--- On Wed, 1/27/10, Daniel Stutzbach <[email protected]> wrote:
> From: Daniel Stutzbach <[email protected]> > Subject: Re: [Python-Dev] patch to make list.pop(0) work in O(1) time > To: "Steve Howell" <[email protected]> > Cc: "John Arbash Meinel" <[email protected]>, [email protected] > Date: Wednesday, January 27, 2010, 8:20 AM > On Wed, Jan 27, > 2010 at 9:55 AM, Steve Howell <[email protected]> > 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 [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
