Mike Klaas wrote:
In my perfect world, strings would be indicable and
sliceable, but not
An object that was indexable but not iterable would be a very strange thing. If it has __len__ and __getitem__, there's nothing to stop you iterating over it by hand anyway, so disallowing __iter__ would just seem perverse.
A case could be made for strings being sliceable but neither indexable nor iterable, but it's probably too late to make such a radical change now.