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

2008-05-22 Thread Guido van Rossum
On Thu, May 22, 2008 at 6:46 PM, Atsuo Ishimoto <[EMAIL PROTECTED]> wrote: > On Fri, May 23, 2008 at 6:18 AM, Guido van Rossum <[EMAIL PROTECTED]> wrote: > 2. If you don't want any non-ASCII printed to a file, set the file's encoding to ASCII and the error handler to backslashescape. >> >

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

2008-05-22 Thread Atsuo Ishimoto
On Fri, May 23, 2008 at 6:18 AM, Guido van Rossum <[EMAIL PROTECTED]> wrote: >>> 2. If you don't want any non-ASCII printed to a file, set the file's >>> encoding to ASCII and the error handler to backslashescape. > > On Thu, May 22, 2008 at 12:59 PM, Antoine Pitrou <[EMAIL PROTECTED]> wrote: >> S

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

2008-05-22 Thread Guido van Rossum
> Le jeudi 22 mai 2008 à 10:55 -0700, Guido van Rossum a écrit : >> Is this thread reaching a conclusion yet? I am hoping I can soon >> accept some variant of the following: >> >> 1. repr() returns a Unicode string containing only printable Unicode >> characters, using \x\u\U escapes for characters

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

2008-05-22 Thread Guido van Rossum
On Thu, May 22, 2008 at 1:56 PM, Oleg Broytmann <[EMAIL PROTECTED]> wrote: > On Thu, May 22, 2008 at 10:41:34PM +0200, "Martin v. L?wis" wrote: >> Would "encoding/errorhandler" sound like a useful syntax? > > encoding:errorhandler Whichever character is guaranteed never to be part of an encoding

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

2008-05-22 Thread Oleg Broytmann
On Thu, May 22, 2008 at 10:41:34PM +0200, "Martin v. L?wis" wrote: > Would "encoding/errorhandler" sound like a useful syntax? encoding:errorhandler Oleg. -- Oleg Broytmannhttp://phd.pp.ru/[EMAIL PROTECTED] Programmers don't die, they just GOSUB without

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

2008-05-22 Thread Martin v. Löwis
> Is Martin's proposal to allow forcing the default stdin/stdout/stderr > encodings through environment variables related? (It should allow for > setting the error handler too.) It's related only if it supports setting the error handler as well. Would "encoding/errorhandler" sound like a useful s

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

2008-05-22 Thread Martin v. Löwis
> The Unicode consortium usually uses the terms "UCS2" and "UCS4" > when referring to Unicode as "character set", but even there > you have an ordering which makes it an encoding. The Unicode consortium uses the term "coded character set" to describe the assignment of characters in the set to numb

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

2008-05-22 Thread Antoine Pitrou
Le jeudi 22 mai 2008 à 10:55 -0700, Guido van Rossum a écrit : > Hi folks, > > Is this thread reaching a conclusion yet? I am hoping I can soon > accept some variant of the following: > > 1. repr() returns a Unicode string containing only printable Unicode > characters, using \x\u\U escapes for c

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

2008-05-22 Thread M.-A. Lemburg
On 2008-05-22 19:55, Guido van Rossum wrote: Hi folks, Is this thread reaching a conclusion yet? I am hoping I can soon accept some variant of the following: 1. repr() returns a Unicode string containing only printable Unicode characters, using \x\u\U escapes for characters that are not conside

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

2008-05-22 Thread M.-A. Lemburg
On 2008-05-22 19:52, Stephen J. Turnbull wrote: M.-A. Lemburg writes: > On 2008-05-22 13:58, Antoine Pitrou wrote: > > M.-A. Lemburg egenix.com> writes: > >> It's all a matter of perspective. You can say you're encoding Latin-1 > >> to Unicode, or you can say your encoding Unicode to Latin-1

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

2008-05-22 Thread Guido van Rossum
Hi folks, Is this thread reaching a conclusion yet? I am hoping I can soon accept some variant of the following: 1. repr() returns a Unicode string containing only printable Unicode characters, using \x\u\U escapes for characters that are not considered printable according to some version of the

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

2008-05-22 Thread Stephen J. Turnbull
M.-A. Lemburg writes: > On 2008-05-22 13:58, Antoine Pitrou wrote: > > M.-A. Lemburg egenix.com> writes: > >> It's all a matter of perspective. You can say you're encoding Latin-1 > >> to Unicode, or you can say your encoding Unicode to Latin-1. > > > > Except that Latin-1 is an encoding wh

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

2008-05-22 Thread M.-A. Lemburg
On 2008-05-22 13:58, Antoine Pitrou wrote: M.-A. Lemburg egenix.com> writes: It's all a matter of perspective. You can say you're encoding Latin-1 to Unicode, or you can say your encoding Unicode to Latin-1. Except that Latin-1 is an encoding while Unicode is not. So I don't see how you can e

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

2008-05-22 Thread Antoine Pitrou
M.-A. Lemburg egenix.com> writes: > > It's all a matter of perspective. You can say you're encoding Latin-1 > to Unicode, or you can say your encoding Unicode to Latin-1. Except that Latin-1 is an encoding while Unicode is not. So I don't see how you can encode to Unicode. Of course you can enco

[Python-3000] Cython code generation for Py3 complete

2008-05-22 Thread Stefan Behnel
Hi, just a quick announcement that I finished the port of the Cython compiler to Py3. While you cannot currently run Cython itself in Py3, you can build the generated C sources unchanged under Py2.3 through 3.0a5. http://cython.org/ There isn't a release yet (though there will hopefully be o