This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author alex
Recipients alex
Date 2013-03-02.17:23:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1362245019.42.0.972918137955.issue17338@psf.upfronthosting.co.za>
In-reply-to
Content
Following the length_hint PEP, we should expose this facility to end-python programmers. The semantics would be basically: the list has behavior identical to if you hadn't provided length_hint, except the VM is free to preallocate efficiently.

CPython (and PyPy) use this kind of logic internally all over the place when lists are to be returned (including, but not limited to, list() with a single argument!)

If this is considered to be a good idea I'll whip up a patch.
History
Date User Action Args
2013-03-02 17:23:39alexsetrecipients: + alex
2013-03-02 17:23:39alexsetmessageid: <1362245019.42.0.972918137955.issue17338@psf.upfronthosting.co.za>
2013-03-02 17:23:39alexlinkissue17338 messages
2013-03-02 17:23:39alexcreate