[Python-3000] callable()

Thomas Wouters thomas at python.org
Fri Jul 21 14:04:33 CEST 2006


On 7/21/06, Guido van Rossum <guido at python.org> 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 <thomas at python.org>

Hi! I'm a .signature virus! copy me into your .signature file to help me
spread!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-3000/attachments/20060721/7f277cc0/attachment.htm 


More information about the Python-3000 mailing list