[Python-ideas] discontinue iterable strings

Random832 random832 at fastmail.com
Sun Aug 21 03:02:02 EDT 2016


On Sun, Aug 21, 2016, at 02:53, Michael Selik wrote:
> For that to make sense, Iterable should be a parent of C, or C should
> be a subclass of something registered as an Iterable. Otherwise it'd
> be creating a general recommendation to say ``__iter__ = None`` on
> every non-Iterable class, which would be silly.

Er, we're talking about defining it on every non-iterable class *that
defines __getitem__* (such as str in this thought experiment)


More information about the Python-ideas mailing list