Re: [Python-3000] PEP: str(container) should call str(item), not repr(item)

2008-06-01 Thread Benjamin Peterson
On Sun, Jun 1, 2008 at 9:56 PM, Jim Jewett <[EMAIL PROTECTED]> wrote: > On 5/29/08, Oleg Broytmann <[EMAIL PROTECTED]> wrote: >> On Thu, May 29, 2008 at 12:31:17PM -0700, Guido van Rossum wrote: >>> ... I'm opposed to this change, and that I believe >>> that it would cause way too much >>> disturba

Re: [Python-3000] PEP: str(container) should call str(item), not repr(item)

2008-06-01 Thread Jim Jewett
On 5/29/08, Oleg Broytmann <[EMAIL PROTECTED]> wrote: > On Thu, May 29, 2008 at 12:31:17PM -0700, Guido van Rossum wrote: >> ... I'm opposed to this change, and that I believe >> that it would cause way too much >> disturbance to be accepted this close to beta. >That's ok. A rejected PEP has i

Re: [Python-3000] sys.exc_info()

2008-06-01 Thread Collin Winter
On Sat, May 31, 2008 at 6:08 PM, Mark Hammond <[EMAIL PROTECTED]> wrote: > Antoine: >> Mark Hammond skippinet.com.au> writes: >> > In both Python 2.x and 3 (a few months old build of Py3k though), the >> > traceback isn't the same. For Python 2.0 you could write it like: >> > >> > def handle_exce

Re: [Python-3000] Exception re-raising woes

2008-06-01 Thread Collin Winter
On Fri, May 30, 2008 at 6:33 PM, Antoine Pitrou <[EMAIL PROTECTED]> wrote: > Guido van Rossum python.org> writes: >> I would be okay as well with restricting bare raise syntactically to >> appearing only inside an except block, to emphasize the change in >> semantics that was started when we decid

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] [Python-Dev] Stabilizing the C API of 2.6 and 3.0

2008-06-01 Thread Gregory P. Smith
On Fri, May 30, 2008 at 1:37 AM, M.-A. Lemburg <[EMAIL PROTECTED]> wrote: > On 2008-05-30 00:57, Nick Coghlan wrote: >> >> M.-A. Lemburg wrote: >>> >>> * Why can't we have both PyString *and* PyBytes exposed in 2.x, >>> with one redirecting to the other ? >> >> We do have that - the PyString_* name

Re: [Python-3000] [Python-Dev] Finishing up PEP 3108

2008-06-01 Thread Quentin Gallet-Gilles
I've uploaded a patch for the aifc module (http://bugs.python.org/issue2847). I'm still working on the testsuite. Comments are welcome! Quentin On Thu, May 29, 2008 at 5:39 PM, Quentin Gallet-Gilles <[EMAIL PROTECTED]> wrote: > > On Thu, May 29, 2008 at 4:56 PM, Lars Immisch <[EMAIL PROTECTED]>

Re: [Python-3000] Exception re-raising woes

2008-06-01 Thread Antoine Pitrou
Hello, A patch is now at http://bugs.python.org/issue3021 . Antoine. ___ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40ma

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] doctest portability

2008-06-01 Thread Stefan Behnel
Guido van Rossum wrote: > I really don't like the idea of having Py3k code with doctests written > in a dialect of Py2k... BTW, this argument might hold for code that was written for Py3, of which there currently is close to nothing. Stefan ___ Python-

Re: [Python-3000] doctest portability

2008-06-01 Thread Stefan Behnel
Stefan Behnel wrote: > It would be > really nice if the doctest module had a simple option that specified if the > doctests of a test suite are in Py2 or Py3 syntax, and then just did the right > thing under Py3 (and maybe also 2.6). I filed a feature request on this for now. http://bugs.python.o

Re: [Python-3000] doctest portability

2008-06-01 Thread Stefan Behnel
Hi, Nick Coghlan wrote: > Doctest just uses 'exec' under the covers though - the only way for it > to run code using non-native syntax would be for it to be able to invoke > a non-native parser and then run the resulting AST directly, or for it > to invoke 2to3 on the docstring. I think it should

Re: [Python-3000] doctest portability

2008-06-01 Thread Nick Coghlan
Stefan Behnel wrote: That's simple to do. However, doctests in user documentation are much harder to write in a portable way, as all that overhead of (e.g.) encoding byte strings to unicode strings for normalised output comparison is very distracting for readers, so it would be much better if you

Re: [Python-3000] doctest portability

2008-06-01 Thread Stefan Behnel
Hi again, sorry, mail editing disorder. I meant to say this: Stefan Behnel wrote: > BTW, last time I checked, options were passed into lib2to3 as attributes of > an object. I find that very inconvenient. A dict or keyword arguments would > work much better. And just to give a hint on what I mean

Re: [Python-3000] [Python-Dev] Iterable String Redux (aka String ABC)

2008-06-01 Thread Oren Tirosh
On Tue, May 27, 2008 at 12:42:48PM -0700, Guido van Rossum wrote: > [+python-3000] > > On Tue, May 27, 2008 at 12:32 PM, Armin Ronacher > <[EMAIL PROTECTED]> wrote: ... > > A problem comes up as soon as user defined strings (such as UserString) is > > passed to the function. In my opinion a good

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