On 7/21/06, Guido van Rossum <[EMAIL PROTECTED]> wrote:
I'd like to hear from others whether the default iter fallback ought
to stay or go.

It should go (in py3k, obviously not in 2.6.) Maybe there should be a convenient way to spell 'iter me like a sequence', but it should definately be explicit, not implicit.

> > (I also think that the two-argument form
> > iter(function, sentinel) is not very successful or useful and might be
> > dropped, but that's a separate issue.)
>
> This functionality should be moved to itertools.
> That will clear-up the odd function signature for iter().
> As it stands now, the function/sentinel form suffers from invisibility.

That doesn't matter much since there are very few uses for it.

I disagree, I use it reasonably often. Much more often than I'd use, say, the 'with' statement or the ifelse operator, even more often than I use classmethods (which I like, and use wherever appropriate.) I agree that the spelling is somewhat unfortunate, much like the different uses of type(), but I do consider it less of a wart than type(). I'd be -0 on moving it to itertools in py3k.

--
Thomas Wouters <[EMAIL PROTECTED]>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to