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

2018-09-08 Thread Greg Ewing
Stephan Houben wrote: To be honest, quite apart from the Unicode issue, I never had a need to reverse a string in real code. Yeah, seems to me it would only be useful if you were working on some kind of word game such as a palindrome generator, or if your string represents something other than

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

2018-09-08 Thread Richard Damon
On 9/8/18 4:55 PM, Jonathan Fine wrote: > Chris Angelico wrote: > >> Improving a rendering engine or console so it's capable of correct RTL >> display is outside the scope of Python code, generally. > I agree with you, generally. > > But there are over 600 million people who speak a RTL language. A

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

2018-09-08 Thread Chris Angelico
On Sun, Sep 9, 2018 at 6:55 AM, Jonathan Fine wrote: > Chris Angelico wrote: > >> Improving a rendering engine or console so it's capable of correct RTL >> display is outside the scope of Python code, generally. > > I agree with you, generally. > > But there are over 600 million people who speak a

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

2018-09-08 Thread Jonathan Fine
Chris Angelico wrote: > Improving a rendering engine or console so it's capable of correct RTL > display is outside the scope of Python code, generally. I agree with you, generally. But there are over 600 million people who speak a RTL language. About 12% of the world's population. I'd like Pyth

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

2018-09-08 Thread Chris Angelico
On Sun, Sep 9, 2018 at 6:08 AM, Jonathan Fine wrote: > Chris Angelico wrote: > >> Generally, problems with RTL text are *display* problems, and are not >> solved by reversing strings. > > I very much agree with this statement, with one exception. If you wish > to display RTL text on a LTR display,

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

2018-09-08 Thread Jonathan Fine
Chris Angelico wrote: > Generally, problems with RTL text are *display* problems, and are not > solved by reversing strings. I very much agree with this statement, with one exception. If you wish to display RTL text on a LTR display, then a suitable reversing of strings is probably part of the so

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

2018-09-08 Thread Chris Angelico
On Sat, Sep 8, 2018 at 11:41 PM, Jonathan Fine wrote: > M.-A. Lemburg wrote: > >> Most likely yes, but they would not render RTL text by first >> switching the direction and then printing them LTR again. >> >> Please also note that switching from LTR to RTL and back again >> is possible within a U

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

2018-09-08 Thread Paddy3118
Please involve those with more knowledge on the subject. Thanks. On Saturday, 8 September 2018 13:13:05 UTC+1, Jonathan Fine wrote: > > Paddy wrote > > > 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

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

2018-09-08 Thread Jonathan Fine
M.-A. Lemburg wrote: > Most likely yes, but they would not render RTL text by first > switching the direction and then printing them LTR again. > > Please also note that switching from LTR to RTL and back again > is possible within a Unicode string, so applying str.reverse() > would actually make

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

2018-09-08 Thread M.-A. Lemburg
On 08.09.2018 15:00, Jonathan Fine wrote: > Stephan Houben wrote: > >> To be honest, quite apart from the Unicode issue, I never had a need to >> reverse a string in real code. >> >> .ytilibigel edepmi ot sdnet yllareneg tI > > Sometimes we have to write 'backwards' to improve legibility. Odd > t

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

2018-09-08 Thread Jonathan Fine
Stephan Houben wrote: > To be honest, quite apart from the Unicode issue, I never had a need to > reverse a string in real code. > > .ytilibigel edepmi ot sdnet yllareneg tI Sometimes we have to write 'backwards' to improve legibility. Odd though that may sound. Some languages are written from l

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

2018-09-08 Thread Stephan Houben
Op za 8 sep. 2018 13:33 schreef Paddy3118 : > > 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!* > To be honest, quite apart from

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

2018-09-08 Thread Jonathan Fine
Paddy wrote > 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! Excellent post and piece of work. Well done! Here's someone who might k