[Python-3000] Two proposals for a new list-like type: one modest, one radical

Daniel Stutzbach daniel at stutzbachenterprises.com
Mon Apr 23 19:58:20 CEST 2007

On 4/23/07, Josiah Carlson <jcarlson at uci.edu> wrote:
> "Daniel Stutzbach" <daniel at stutzbachenterprises.com> wrote:
> > On 4/23/07, Bill Janssen <janssen at parc.com> wrote:
> > > > Replace list() with the BList.
> > >
> > > Generally, I like the idea.  But how about extension modules
> > > which make use of the current implementation details?
> >
> > PyListObject could be moved to the collections module so that C
> > extension modules can continue to use it.
> Unless the implementation of a module is #included from Python.h, it is
> not going to be available to extension modules; either its
> implementation or its interface.

So, I was unclear.  I was picturing PyListObject still being built-in
to the interpreter and exposed via Python.h (in C).  That way,
extension modules could still use it.  Within the Python language, it
could be made available via collections.list.  Or it could continue to
be __buitins__.list.

By "replacing list", I'm mostly concerned about the return type of
things like "[1,2,3,4]" and list comprehensions.

Daniel Stutzbach, Ph.D.             President, Stutzbach Enterprises LLC

More information about the Python-3000 mailing list