Re: [Python-3000] Implementing % formatting in terms of str.format()

2008-04-12 Thread Nick Coghlan
Benjamin Peterson wrote: >> Please don't -- a Py3k warning makes no sense if the feature isn't really >> going away in Py3k. Py3k warnings really should only warn about things >> that are going to break in 3.0. >> >> If the decision is reached that such a warning makes sense, I'd propose >> to

Re: [Python-3000] Recursive str

2008-04-12 Thread Greg Ewing
Guido van Rossum wrote: > We'd > need a third form (eek!) that would preserve the string quotes but be > more lenient about non-ASCII. Personally, I think some custom loop to > print the values is good enough. It might not be a serious problem when most of the chars in the string are ascii, but wh

Re: [Python-3000] Equality of range objects

2008-04-12 Thread Benjamin Peterson
If you're interested, I've implemented equality for range in issue 2603. -- Cheers, Benjamin Peterson ___ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/o

Re: [Python-3000] Implementing % formatting in terms of str.format()

2008-04-12 Thread Benjamin Peterson
> Please don't -- a Py3k warning makes no sense if the feature isn't really > going away in Py3k. Py3k warnings really should only warn about things > that are going to break in 3.0. > > If the decision is reached that such a warning makes sense, I'd propose > to only warn in an "extended Py3k

[Python-3000] Inclusion of the optimized C version of io.BytesIO into Py3K's trunk

2008-04-12 Thread Alexandre Vassalotti
Hello, Since I am free today, I would like to merge my work on io.BytesIO into Py3K's trunk. Antoine Pitrou reviewed my patch (see http://bugs.python.org/issue1751) and concluded that the new module looked fine. However, he couldn't say much about my changes to io.py and _fileio.c (i.e., the seman

Re: [Python-3000] Implementing % formatting in terms of str.format()

2008-04-12 Thread Steven Bethard
On Sat, Apr 12, 2008 at 12:26 PM, Georg Brandl <[EMAIL PROTECTED]> wrote: > Steven Bethard schrieb: > > > On Sat, Apr 12, 2008 at 8:26 AM, <[EMAIL PROTECTED]> wrote: > >> > >> Nick> That's exactly the problem though - while a 2to3 fixer can be > >> Nick> written for a tiny subset of for

Re: [Python-3000] Implementing % formatting in terms of str.format()

2008-04-12 Thread Georg Brandl
Steven Bethard schrieb: > On Sat, Apr 12, 2008 at 8:26 AM, <[EMAIL PROTECTED]> wrote: >> >> Nick> That's exactly the problem though - while a 2to3 fixer can be >> Nick> written for a tiny subset of formatting calls (those that meet the >> Nick> constraints you gave)... >> >> In my per

Re: [Python-3000] Implementing % formatting in terms of str.format()

2008-04-12 Thread Steven Bethard
On Sat, Apr 12, 2008 at 8:26 AM, <[EMAIL PROTECTED]> wrote: > > Nick> That's exactly the problem though - while a 2to3 fixer can be > Nick> written for a tiny subset of formatting calls (those that meet the > Nick> constraints you gave)... > > In my personal experience, either the LHS

Re: [Python-3000] Implementing % formatting in terms of str.format()

2008-04-12 Thread Rodrigo Bernardo Pimentel
On Sat, Apr 12 2008 at 12:15:33PM BRT, "\"Martin v. Löwis\"" <[EMAIL PROTECTED]> wrote: > > True, I'm not implying anything should be broken, just that much of the work > > can be mechanical conversion. Also, for some of us, % formatting will > > remain the "first way" of generating formatted str

Re: [Python-3000] Implementing % formatting in terms of str.format()

2008-04-12 Thread Martin v. Löwis
> True, I'm not implying anything should be broken, just that much of the work > can be mechanical conversion. Also, for some of us, % formatting will > remain the "first way" of generating formatted string output as long as it > exists in the language. For that reason, I wouldn't want 2to3 to co

Re: [Python-3000] Implementing % formatting in terms of str.format()

2008-04-12 Thread Rodrigo Bernardo Pimentel
On Sat, Apr 12 2008 at 10:49:43AM BRT, Nick Coghlan <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > >> Is there a 2-to-3 fixer for % format? I scanned the fixes directly > > >> quickly but didn't see anything obvious. > > > > Benjamin> I believe the only reason that % is eve

Re: [Python-3000] Implementing % formatting in terms of str.format()

2008-04-12 Thread skip
Nick> That's exactly the problem though - while a 2to3 fixer can be Nick> written for a tiny subset of formatting calls (those that meet the Nick> constraints you gave)... In my personal experience, either the LHS will be a string literal or the RHS will be locals(), globals() or a tu

Re: [Python-3000] Implementing % formatting in terms of str.format()

2008-04-12 Thread Nick Coghlan
Eric Smith wrote: > Guido van Rossum wrote: >> If 2.6 can't support %b, so be it. > > It would really be easiest to just say that if you want binary > formatting in both 2.6 and 3.0, use str.format. I don't think expanding > the functionality of % formatting is what anyone should be spending >

Re: [Python-3000] Implementing % formatting in terms of str.format()

2008-04-12 Thread Nick Coghlan
[EMAIL PROTECTED] wrote: > >> Is there a 2-to-3 fixer for % format? I scanned the fixes directly > >> quickly but didn't see anything obvious. > > Benjamin> I believe the only reason that % is even in 3.0 is that a 2to3 > Benjamin> fixer couldn't be easily written for it. > > I f