[Python-3000] callable()
Greg Ewing
greg.ewing at canterbury.ac.nz
Fri Jul 21 03:48:31 CEST 2006
Guido van Rossum wrote:
> Actually, the autowrapping was intended a backwards compatibility measure.
But it seems like a perfectly good and useful feature
in its own right to me. Why force every sequence to
implement its own __iter__ if there is a default one
that does the same as what your custom one would have
done anyway?
An alternative would be to give object an __iter__
method containing the default implementation. But
then you've lost all ability to test for potential
iterability, since everything has an __iter__ whether
it works or not.
So +1 from me on keeping the status quo wrt __iter__
in Py3k.
--
Greg
More information about the Python-3000
mailing list