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

2008-06-03 Thread Atsuo Ishimoto
On Wed, Jun 4, 2008 at 6:02 AM, Guido van Rossum <[EMAIL PROTECTED]> wrote: > On Tue, Jun 3, 2008 at 10:53 AM, Atsuo Ishimoto <[EMAIL PROTECTED]> wrote: >> I updated PEP and patch. New patch is updated to >> http://bugs.python.org/issue2630. >> >> Changes are:: >> >> - Added conversion flag to the

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

2008-06-03 Thread Guido van Rossum
On Tue, Jun 3, 2008 at 10:53 AM, Atsuo Ishimoto <[EMAIL PROTECTED]> wrote: > I updated PEP and patch. New patch is updated to > http://bugs.python.org/issue2630. > > Changes are:: > > - Added conversion flag to the str.format() and PyUnicode_FromFormat() C API. > > - Added new C API PyObject_ASCII(

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

2008-06-03 Thread Guido van Rossum
On Sun, Jun 1, 2008 at 8:32 AM, Atsuo Ishimoto <[EMAIL PROTECTED]> wrote: > Here's new PEP, and new patch is uploaded at > http://bugs.python.org/issue2630. > (codereview.appspot.com refused to create new issue for this patch, btw.) Thanks for the report! I had made codereview UTF-8-aware, but i

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

2008-06-03 Thread Atsuo Ishimoto
> Mark Summerfield suggested to add "!a" conversion flag to the > str.format() method. I'll add the conversion flag to the patch and > PEP later today. I updated PEP and patch. New patch is updated to http://bugs.python.org/issue2630. Changes are:: - Added conversion flag to the str.format() an

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

2008-06-02 Thread Atsuo Ishimoto
On Tue, Jun 3, 2008 at 7:30 AM, Guido van Rossum <[EMAIL PROTECTED]> wrote: > On Sun, Jun 1, 2008 at 6:21 PM, Greg Ewing <[EMAIL PROTECTED]> wrote: >> Atsuo Ishimoto wrote: >> >>> I'm not comfortable with "printable", too. Is "legible" better? This >>> is first time for me to see this word in my li

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

2008-06-02 Thread Stephen J. Turnbull
Atsuo Ishimoto writes: > Okay, we'll keep 'strict' as default error handler for stdout always, > then. I can live with it. > But, my $0.02, I expect this issue will be revisited after people > start to develop real applications with Python 3.x. I agree, I expect it to be revisited too. But i

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

2008-06-02 Thread Guido van Rossum
On Sun, Jun 1, 2008 at 6:21 PM, Greg Ewing <[EMAIL PROTECTED]> wrote: > Atsuo Ishimoto wrote: > >> I'm not comfortable with "printable", too. Is "legible" better? This >> is first time for me to see this word in my life :). > > The term "printable" has a long history in computing of > meaning that

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

2008-06-01 Thread Greg Ewing
Atsuo Ishimoto wrote: I'm not comfortable with "printable", too. Is "legible" better? This is first time for me to see this word in my life :). The term "printable" has a long history in computing of meaning that a character code corresponds to some visual glyph, even if the display process in

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

2008-06-01 Thread Atsuo Ishimoto
On Mon, Jun 2, 2008 at 2:39 AM, Alexandre Vassalotti <[EMAIL PROTECTED]> wrote: > On Sun, Jun 1, 2008 at 11:32 AM, Atsuo Ishimoto <[EMAIL PROTECTED]> wrote: >> >> -- >> PEP: 3138 >> >> Title: String representation in Python 3000 >> Version: $Revision$ >>

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

2008-06-01 Thread Atsuo Ishimoto
On Sun, Jun 1, 2008 at 2:30 AM, Atsuo Ishimoto <[EMAIL PROTECTED]> wrote: > > I'll update the PEP and the patch on Sunday. Thank you! Here's new PEP, and new patch is uploaded at http://bugs.python.org/issue2630. (codereview.appspot.com refused to create new issue for this patch, btw.) ---

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

2008-06-01 Thread Marcin ‘Qrczak’ Kowalczyk
2008/6/1 Atsuo Ishimoto <[EMAIL PROTECTED]>: > In my case, ls checks characters in the file name and convert invalid > characters to '?'. GNU ls has more options for displaying filenames with weird characters: http://www.gnu.org/software/coreutils/manual/coreutils.html#Formatting-the-file-names

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

2008-06-01 Thread Atsuo Ishimoto
On Sun, Jun 1, 2008 at 5:15 PM, Oleg Broytmann <[EMAIL PROTECTED]> wrote: > > Filesystem encoding is koi8-r, terminal encoding is UTF-8, ls doesn't > convert (because it doesn't know filesystem encoding) but simply replaces, > like in Python filename.encode(LC_CTYPE, "replace"). No error reported

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

2008-06-01 Thread Oleg Broytmann
On Sun, Jun 01, 2008 at 04:23:10PM +0900, Atsuo Ishimoto wrote: > silently print converted > characters. Ditto for utilities such as 'ls'. $ ls -lF work/ total 72 drwxr-x--- 7 phd phd 4096 May 27 11:14 ?/ drwx-- 9 phd phd 4096 May 30 17:30 ?/ drwxr-xr-x 4 phd phd 4096 May 13 18:35 b

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

2008-06-01 Thread Atsuo Ishimoto
On Sun, Jun 1, 2008 at 6:33 AM, Adam Olsen <[EMAIL PROTECTED]> wrote: > I think the reason why strict/backslashreplace (respectively) work > well is that you can print a unicode string to stdout, have it fail > (encoding can't handle it), then get an exception printed to stderr > with the string e

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

2008-05-31 Thread Guido van Rossum
On Sat, May 31, 2008 at 2:33 PM, Adam Olsen <[EMAIL PROTECTED]> wrote: > I think the reason why strict/backslashreplace (respectively) work > well is that you can print a unicode string to stdout, have it fail > (encoding can't handle it), then get an exception printed to stderr > with the string e

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

2008-05-31 Thread Adam Olsen
On Sat, May 31, 2008 at 11:30 AM, Atsuo Ishimoto <[EMAIL PROTECTED]> wrote: > On Sun, Jun 1, 2008 at 1:32 AM, Guido van Rossum <[EMAIL PROTECTED]> wrote: >> - I'm still not comfortable with making stdout default to >> backslashreplace. Stuff written to stdout might be consumed by another >> program

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

2008-05-31 Thread Guido van Rossum
Great -- get ready to make your patch perfect! On Sat, May 31, 2008 at 10:30 AM, Atsuo Ishimoto <[EMAIL PROTECTED]> wrote: > Hi Guido, > > On Sun, Jun 1, 2008 at 1:32 AM, Guido van Rossum <[EMAIL PROTECTED]> wrote: >> Hi Atsuo, >> >> I'm very close to accepting your PEP. I have a few questions: >

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

2008-05-31 Thread Atsuo Ishimoto
Hi Guido, On Sun, Jun 1, 2008 at 1:32 AM, Guido van Rossum <[EMAIL PROTECTED]> wrote: > Hi Atsuo, > > I'm very close to accepting your PEP. I have a few questions: Great! > > - The Rationale has a more elaborate (and perhaps slightly > conflicting, regarding the status of ASCII space?) definitio

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

2008-05-31 Thread Guido van Rossum
Hi Atsuo, I'm very close to accepting your PEP. I have a few questions: - The Rationale has a more elaborate (and perhaps slightly conflicting, regarding the status of ASCII space?) definition of our definition of non-printable than the Specification. Perhaps this could be merged? - I'm still no

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

2008-05-28 Thread Atsuo Ishimoto
On Wed, May 28, 2008 at 5:12 AM, Jim Jewett <[EMAIL PROTECTED]> wrote: >> >> - Add ``'%a'`` string format operator. ``'%a'`` converts any python >> >> object to string using ``repr()`` and then hex-escape all non-ASCII >> >> characters. ``'%a'`` operator generates same string as ``'%r'`` in

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

2008-05-28 Thread Atsuo Ishimoto
On Tue, May 27, 2008 at 10:06 AM, Jim Jewett <[EMAIL PROTECTED]> wrote: >> * Characters defined in the Unicode character database as "Separator" >> (Zl, Zp, Zs) other than ASCII space(0x20). > > Please put in a note that Zl and Zp refer only to two specific > unicode characters, not to what