blist question

Raymond Hettinger python at
Thu Jul 7 18:46:16 EDT 2011

On Jul 7, 5:08 am, dmitrey <dmitre... at> wrote:
> hi all,
> I feel lack of native Python lists operations (e.g. taking N greatest
> elements with the involved key function and O(n) speed)

Take a look at heapq.nlargest()...

> and
> occasionally found blist
> Its entry says it is better than Python list.

It should say:  better in some respects and worse in others

Do you honestly think that python's list implementation
as a simple array of pointers can be beaten in every
category of performance?

> Did anyone ensure?
> Will it ever be merged into Python source code?

It was rejected as a replacement for the existing list implementation.
There is some chance it will get accepted into the collections module


More information about the Python-list mailing list