[Python-3000] Builtin iterator type
George Sakkis
george.sakkis at gmail.com
Tue Nov 14 07:59:57 CET 2006
On 11/14/06, Ronald Oussoren <ronaldoussoren at mac.com> wrote:
>
> On 14 Nov 2006, at 4:26 AM, George Sakkis wrote:
>
> >
> > I honestly fail to understand your current objections. Is my analogy
> > with dictmixin flawed ? Would anything change if I named it
> > "itermixin" instead of iter or Iter ? I'm ok with the idea being
> > rejected, but at least I'd like to understand the reasons.
>
> You basically propose to extend the iterator interface from 1 method
> to len(dir(itertools)) methods without any clear benefits. Saving a
> single import line is not a clear benefit.
The original motivation is to provide syntax sugar (+, *, indexing,
slicing) to iterators, which you can't do with functions. The rest
methods that would be spelled out with their current itertools names
is a fortunate side-effect, not the primary motivation.
George
More information about the Python-3000
mailing list