Re: [Python-3000] UPDATED: PEP 3138- String representation in Python3000

2008-05-24 Thread Atsuo Ishimoto
On Sun, May 25, 2008 at 9:45 AM, Nick Coghlan <[EMAIL PROTECTED]> wrote: > Terry Reedy wrote: >> >> | >> | - Add ``isprintable()`` method to the string type. ``str.isprintable()`` >> | return True if ``repr()`` should escape the characters in the string, >> | False otherwise. >> >> Is not this ba

Re: [Python-3000] UPDATED: PEP 3138- String representation in Python3000

2008-05-24 Thread Nick Coghlan
Terry Reedy wrote: | | - Add ``isprintable()`` method to the string type. ``str.isprintable()`` | return True if ``repr()`` should escape the characters in the string, | False otherwise. Is not this backwards? Isprintable to me mean should *not* escape. I agree (I suspect the incorrect phra

Re: [Python-3000] PEP 3138- String representation in Python 3000

2008-05-24 Thread Bill Janssen
> Not that difficult. Suppose I have the character Ә, I just do > > py> unicodedata.name(u"Ә") > 'CYRILLIC CAPITAL LETTER SCHWA' > > I used cut-n-paste to insert the character into the interactive prompt; > that worked just fine. I suppose, if I knew about unicodedata.name(), and if my cursed

Re: [Python-3000] UPDATED: PEP 3138- String representation in Python3000

2008-05-24 Thread Terry Reedy
| | - Add ``isprintable()`` method to the string type. ``str.isprintable()`` | return True if ``repr()`` should escape the characters in the string, | False otherwise. Is not this backwards? Isprintable to me mean should *not* escape. ___ Python-

Re: [Python-3000] PEP 3138- String representation in Python 3000

2008-05-24 Thread Martin v. Löwis
> The nice thing about hex-escaped characters is that I can look up the > character code to find out what the character is. Hard to do that > with a glyph that I don't recognize. Not that difficult. Suppose I have the character Ә, I just do py> unicodedata.name(u"Ә") 'CYRILLIC CAPITAL LETTER SCH

Re: [Python-3000] PEP 3138- String representation in Python 3000

2008-05-24 Thread Bill Janssen
> Atsuo Ishimoto writes: > > > Yes. My question is "Which do you feel comfortable, printing collect > > glyphs or hex-escaped ASCII ?". I prefer printed glyphs for foreign > > characters, but I had feeling that western people prefer hex-escaped > > ASCII in general. But from responses I saw, p

Re: [Python-3000] PEP 3138- String representation in Python 3000

2008-05-24 Thread Oleg Broytmann
On Sat, May 24, 2008 at 09:18:14PM +0400, Oleg Broytmann wrote: > On Sat, May 24, 2008 at 12:53:08PM -0400, Jim Jewett wrote: > > if I want pretty, I'll use print (or pprint). > >str(container_of_strings) uses repr(), so you loose prettiness on either > print or '%s' % container_of_strings. Ex

Re: [Python-3000] PEP 3138- String representation in Python 3000

2008-05-24 Thread Oleg Broytmann
On Sat, May 24, 2008 at 12:53:08PM -0400, Jim Jewett wrote: > if I want pretty, I'll use print (or pprint). str(container_of_strings) uses repr(), so you loose prettiness on either print or '%s' % container_of_strings. Exceptions use repr() for file names, e.g., which is very inconvenient, IMHO

Re: [Python-3000] PEP 3138- String representation in Python 3000

2008-05-24 Thread Jim Jewett
On 5/24/08, Stephen J. Turnbull <[EMAIL PROTECTED]> wrote: > Atsuo Ishimoto writes: > > Yes. My question is "Which do you feel comfortable, printing collect > > glyphs or hex-escaped ASCII ?". I prefer printed glyphs for foreign > > characters, but I had feeling that western people prefer he

[Python-3000] UPDATED: PEP 3138- String representation in Python 3000

2008-05-24 Thread Atsuo Ishimoto
I updated a PEP 3138 - String representation in Python 3000. Python wiki is also updated. (http://wiki.python.org/moin/Python3kStringRepr) I would appreciate your comments and help. --- PEP: 3138 Title: String representation in Python 3000 Version: $R

Re: [Python-3000] PEP 3138- String representation in Python 3000

2008-05-24 Thread Stephen J. Turnbull
Atsuo Ishimoto writes: > Yes. My question is "Which do you feel comfortable, printing collect > glyphs or hex-escaped ASCII ?". I prefer printed glyphs for foreign > characters, but I had feeling that western people prefer hex-escaped > ASCII in general. But from responses I saw, perhaps this

Re: [Python-3000] PEP 3138- String representation in Python 3000

2008-05-24 Thread Nick Coghlan
Terry Reedy wrote: "Atsuo Ishimoto" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Yes. My question is "Which do you feel comfortable, printing collect | glyphs or hex-escaped ASCII ?". I prefer printed glyphs for foreign | characters, but I had feeling that western people prefer