[Python-ideas] str.startswith taking any iterator instead of just tuple

Guido van Rossum guido at python.org
Fri Jan 3 01:49:14 CET 2014


By designing an API that doesn't require such overloading.

On Thursday, January 2, 2014, Alexander Heger wrote:

> >>    isinstance(x, Iterable) and not isinstance(x, str)
> >
> > If you find yourself typing that a lot I think you have a bigger problem
> though.
>
> How do you replace this?
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org <javascript:;>
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
>


-- 
--Guido van Rossum (on iPad)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20140102/f2f8d12c/attachment-0001.html>


More information about the Python-ideas mailing list