Serhiy Storchaka added the comment: > There is no string view that I know of. Interesting idea, though, thanks to > the immutability of strings. Would much have to be different other than > boundary checking and __hash__ (and hoping extension authors are changing > things in-place)?
Objects/stringlib/unicode_format.h contains internal structure SubString which can be taken as a basis. But it is unlikely that it will be useful. All API which accept strings will require converting substring views to regular strings. And substring object can consume more memory than full string. This looks like a step backwards from PEP 393. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue17343> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com