On Mon, Oct 14, 2019 at 6:49 AM Andrew Barnert via Python-ideas <python-ideas@python.org> wrote: > And finally, if you want to break strings, it’s probably worth at least > considering making UTF-8 strings first-class objects. They can’t be randomly > accessed, but with an iterable-plus API like files, with seek/tell, or a new > more powerful iterable API like Swift or C++, a lot of languages have found > that to be a useful trade off anyway. >
Breaking the str type to do this seems like a really REALLY bad idea, but if you want a first-class UTF8String, you can certainly have it. Build it on top of some sort of byte buffer (maybe bytearray rather than bytes) with a whole lot of handy methods, and there you are. ChrisA _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/K6C4VH7XY2I3YJOMI3JCUTPESRROOAG5/ Code of Conduct: http://python.org/psf/codeofconduct/