[pypy-issue] [issue903] [list-strategies] expose __pypy__.newlist()

Alex Gaynor tracker at bugs.pypy.org
Tue Oct 11 23:21:25 CEST 2011


New submission from Alex Gaynor <alex.gaynor at gmail.com>:

Now that we've moved map() to app-level we'd like to expose newlist(), however 
we're waiting for list-strategies because it exposes an issue.  How do you pre-
allocate a list when you don't know what type it'll have?  The proposed solution 
is for newlist() to create an empty list with a PreallocateStrategy, this 
strategy promotes as normal to a specialized strategy, but uses 
rlib.objectmodule.newlist to preallocate tehe list.

----------
messages: 3293
nosy: agaynor, pypy-issue
priority: feature
status: unread
title: [list-strategies] expose __pypy__.newlist()

________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue903>
________________________________________


More information about the pypy-issue mailing list