Armin Rigo wrote:

> This said, do we vote for __length_hint__ or __length_cue__? :-)

I prefer something containing "hint" rather than "cue"
because it more explicitly says what we mean.

I feel that __length_hint__ is a bit long, though.
We have __len__, not __length__, so maybe it should
be __len_hint__ or __lenhint__.

> And does anyone objects about __getitem_hint__ or __getitem_cue__?

I'm having trouble seeing widespread use cases for this.
If an object is capable of computing arbitrary items on
demand, seems to me it should be implemented as a
lazily-evaluated sequence or mapping rather than an
iterator.

The iterator protocol is currently very simple and
well-focused on a single task -- producing things
one at a time, in sequence. Let's not clutter it up
with too much more cruft.

-- 
Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,          | Carpe post meridiam!                 |
Christchurch, New Zealand          | (I'm not a morning person.)          |
[EMAIL PROTECTED]          +--------------------------------------+
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to