[Python-ideas] Add Unicode-aware str.reverse() function?
paddy3118 at gmail.com
Mon Sep 10 03:15:48 EDT 2018
On Sunday, 9 September 2018 06:30:19 UTC+1, Steven D'Aprano wrote:
> On Sat, Sep 08, 2018 at 04:33:07AM -0700, Paddy3118 wrote:
> > I wrote a blog post
> > <
> > a decade ago on extending a Rosetta Code task example
> > <http://rosettacode.org/wiki/Reverse_a_string>to handle the correct
> > reversal of strings with combining characters.
> I wouldn't care too much about a dedicated "reverse" method that handled
> combining characters. I think that's just a special case of iterating
> over graphemes. If we can iterate over graphemes, then reversing because
> The Unicode Consortium offer an algorithm for identifying grapheme
> clusters in text strings, and there's at least three requests on the
> tracker (one closed, two open).
Well that ends this idea!
Thanks Steve :-)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas