On Sun, May 10, 2020 at 9:36 PM Andrew Barnert <abarnert@yahoo.com> wrote:However, there is one potential problem with the property I hadn’t thought of until just now: I think people will understand that mylist.view[2:] is not mutable, but will they understand that mystr.view[2:] is not a string? I’m pretty sure that isn’t a problem for seqview(mystr)[2:], but I’m not sure about mystr.view[2:].One more issue around the whole "a string is sequence of strings" thing :-) Of course, it *could* be a string -- not much difference with immutables.
Though I suppose if you took a large slice of a large string, you probably don't want the copy. But what *would* you want to do with it.
but if you had a view of a slice, and it was a proper view, it might be pretty poky for many string operations, so probably just as well not to have them.