[Python-ideas] Add Unicode-aware str.reverse() function?

Paddy3118 paddy3118 at gmail.com
Sat Sep 8 07:33:07 EDT 2018

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.
On checking my blog statistics today I found that it still had a readership 
and revisited the code 
(and updated it to Python3.6)..

I found that amongst the nearly 200 languages that complete the RC 
task,there were a smattering of languages that correctly handled reversing 
strings having Unicode combining characters,
including Perl 6 <http://rosettacode.org/wiki/Reverse_a_string#Perl_6> 
which uses flip.

I would like to propose that Python add a Unicode-aware *str.reverse *method. 
The problem is, I'm a Brit, who only speaks English and only very rarely 
dips into Unicode.* I don't know how useful this would be!*

Cheers, Paddy.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20180908/0bc44d44/attachment.html>

More information about the Python-ideas mailing list