Steven D'Aprano added the comment: On Thu, Aug 03, 2017 at 11:21:38AM +0000, Serhiy Storchaka wrote:
> Should iterators provide just substrings or their positions? [...] I think we're breaking new ground here and I'm not sure what the right API should be. Should we follow Perl 6? https://docs.perl6.org/type/Str Go has a "norm" package for dealing with normalised "characters" (graphemes). https://blog.golang.org/normalization http://godoc.org/golang.org/x/text/unicode/norm Are my comments unacceptible scope-creep? We've gone from talking about a grapheme cluster break algorithm to me talking about Perl6 and Go which have rich string APIs based on graphemes. I'm not even sure of the best place for this: - unicodedata - string - a new module? I don't think unicodedata is the right place -- that should be for data and processing of individual unicode code points, not string handling, and it shouldn't become a grab-bag of random unrelated functions just because they have something to do with Unicode. Can we mark this as having a Provisional API to give us time to decide on the best API before locking it in permanently? https://www.python.org/dev/peps/pep-0411/ I'm reluctant to say this, because it's a lot more work, but maybe this is complicated enough that we should go through a PEP. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue30717> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com