Hi all,
I've just submitted a PEP proposing making __length_hint__ a public API for
users to define and other VMs to implement:
PEP: 424
Title: A method for exposing a length hint
Version: $Revision$
Last-Modified: $Date
Author: Alex Gaynor alex.gay...@gmail.com
Status: Draft
Type: Standards
2012/7/14 Alex Gaynor alex.gay...@gmail.com:
Proposal
This PEP proposes formally documenting ``__length_hint__`` for other
interpreter and non-standard library Python to implement.
``__length_hint__`` must return an integer, and is not required to be
accurate.
It may return a
On Sat, Jul 14, 2012 at 4:18 PM, Benjamin Peterson benja...@python.orgwrote:
2012/7/14 Alex Gaynor alex.gay...@gmail.com:
Proposal
This PEP proposes formally documenting ``__length_hint__`` for other
interpreter and non-standard library Python to implement.
On Sat, Jul 14, 2012 at 4:21 PM, Alex Gaynor alex.gay...@gmail.com wrote:
On Sat, Jul 14, 2012 at 4:18 PM, Benjamin Peterson benja...@python.org
wrote:
2012/7/14 Alex Gaynor alex.gay...@gmail.com:
Proposal
This PEP proposes formally documenting ``__length_hint__`` for
2012/7/14 Alex Gaynor alex.gay...@gmail.com:
On Sat, Jul 14, 2012 at 4:18 PM, Benjamin Peterson benja...@python.org
wrote:
2012/7/14 Alex Gaynor alex.gay...@gmail.com:
Proposal
This PEP proposes formally documenting ``__length_hint__`` for other
interpreter and
On 7/14/2012 6:11 PM, Alex Gaynor wrote:
...
Various thoughts:
This method is then used by various other functions (such +as ``map``)
to presize lists
-- map no longer produces lists. This only makes sense in 3.x if you
mean that map can pass along the value of its inputs.
Types can then
On Sun, Jul 15, 2012 at 9:18 AM, Benjamin Peterson benja...@python.org wrote:
Open questions
==
There are two open questions for this PEP:
* Should ``list`` expose a kwarg in it's constructor for supplying a length
hint.
* Should a function be added either to ``builtins`` or
On Sat, Jul 14, 2012 at 10:16 PM, Nick Coghlan ncogh...@gmail.com wrote:
On Sun, Jul 15, 2012 at 9:18 AM, Benjamin Peterson benja...@python.org
wrote:
Open questions
==
There are two open questions for this PEP:
* Should ``list`` expose a kwarg in it's constructor for