[Python-3000] Making strings non-iterable

Greg Ewing greg.ewing at canterbury.ac.nz
Sun Apr 16 07:20:04 CEST 2006


Jim Jewett wrote:

> (I wouldn't want to give up slicing, though, which might make the
> no-iteration trickier.)

You'd want to allow slicing but not indexing -- i.e.
s[i:j] is okay but not s[i].

--
Greg


More information about the Python-3000 mailing list