Re: [Python-Dev] transitioning from % to {} formatting

2009-10-02 Thread James Y Knight
On Oct 2, 2009, at 2:56 PM, Raymond Hettinger wrote: Do the users get any say in this? I imagine that some people are heavily invested in %-formatting. Because there has been limited uptake on {}-formatting (afaict), we still have limited experience with knowing that it is actually better, less

Re: [Python-Dev] transitioning from % to {} formatting

2009-10-02 Thread Bugbee, Larry
> > Do the users get any say in this? > > I'm a user! :-) > > I hate calling methods on string literals, I think it looks very odd > to have code like this: > > "Displaying {0} of {1} revisions".format(x, y) Ugh! Good point. Is Python to be an easy-to-learn-and-remember language? I submi

Re: [Python-Dev] PEP 3144 review.

2009-10-02 Thread Stephen J. Turnbull
Nick Coghlan writes: > However, while I'd still be a little happier if the .ip attribute > went away all together and another means was found to conveniently > associate an IPAddress and an IPNetwork, keeping it doesn't bother > me anywhere near as much as having network equivalence defined in

Re: [Python-Dev] transitioning from % to {} formatting

2009-10-02 Thread Nick Coghlan
Raymond Hettinger wrote: > Because there has been limited uptake on {}-formatting (afaict), > we still have limited experience with knowing that it is actually > better, less error-prone, easier to learn/rember, etc. Outside > a handful of people on this list, I have yet to see anyone adopt > it

Re: [Python-Dev] transitioning from % to {} formatting

2009-10-02 Thread Terry Reedy
Benjamin Peterson wrote: 2009/10/2 Raymond Hettinger : [Terry Reedy] I would agree, for instance, that an auto-translation tool is needed. We should get one written. ISTM, every %-formatting string is directly translatable to an equivalent {}-formatting string. Yes, but not all are possible

Re: [Python-Dev] transitioning from % to {} formatting

2009-10-02 Thread Nick Coghlan
Steven Bethard wrote: > On Fri, Oct 2, 2009 at 12:43 PM, Martin Geisler wrote: >> I hate calling methods on string literals, I think it looks very odd to >> have code like this: >> >> "Displaying {0} of {1} revisions".format(x, y) >> >> Will we be able to write this as >> >> "Displaying {0} of {

Re: [Python-Dev] PEP 389: argparse - new command line parsing module

2009-10-02 Thread Nick Coghlan
Toshio Kuratomi wrote: > About exit(), I agree with others about wanting to catch the exception > myself and then choosing to exit from the code. I'm not sure that it's > actually useful in practice, though...it might just feel cleaner but not > actually be that helpful. As others have pointed ou

Re: [Python-Dev] PEP 3121

2009-10-02 Thread Nick Coghlan
Andrew Svetlov wrote: > Maybe it's good point to update PEP? > "accepted; may not be implemented yet" sounds a bit confusing. That's the status though - the PEP is accepted, implementation is ongoing. Cheers, Nick. -- Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia -

Re: [Python-Dev] transitioning from % to {} formatting

2009-10-02 Thread Benjamin Peterson
2009/10/2 Raymond Hettinger : > > [Terry Reedy] >> >> I would agree, for instance, that an auto-translation tool is needed. > > We should get one written.  ISTM, every %-formatting > string is directly translatable to an equivalent {}-formatting string. Yes, but not all are possible to guess with

Re: [Python-Dev] transitioning from % to {} formatting

2009-10-02 Thread Raymond Hettinger
[Terry Reedy] I would agree, for instance, that an auto-translation tool is needed. We should get one written. ISTM, every %-formatting string is directly translatable to an equivalent {}-formatting string. Raymond ___ Python-Dev mailing list Pyt

Re: [Python-Dev] PEP 3144 review.

2009-10-02 Thread Nick Coghlan
Mark Dickinson wrote: > On Wed, Sep 30, 2009 at 10:52 AM, Paul Moore wrote: >> 2009/9/30 Mark Dickinson : >>> Please could someone who understands the uses of IPNetwork better than >>> I do explain why the following wouldn't be a significant problem, if __eq__ >>> and __hash__ were modified to dis

Re: [Python-Dev] transitioning from % to {} formatting

2009-10-02 Thread Terry Reedy
Steven Bethard wrote: On Thu, Oct 1, 2009 at 10:49 PM, Terry Reedy wrote: As someone who likes .format() and who already uses such bound methods to print, such as in emsg = "...".format ... if c: print(emsg(arg, barg)) I find this **MUCH** preferable to the ugly and seemingly unnecessary wr

Re: [Python-Dev] transitioning from % to {} formatting

2009-10-02 Thread Brett Cannon
On Wed, Sep 30, 2009 at 05:29, Paul Moore wrote: > 2009/9/30 Barry Warsaw : >> Although I hate the name 'dicttemplate', this seems like the best solution >> to me.  Maybe it's good that 'dicttemplate' is so ugly though so that people >> will naturally prefer 'format' :).  But I like this because t

[Python-Dev] PEP 3121

2009-10-02 Thread Andrew Svetlov
What real status of this document? As I figured out py3k trunk uses this ones. Most part of 'battery included' modules don't use this feature, leaving m_traverse, m_clear and m_free NULL pointers. There are only exception: _io. But looks like all underground python machinery is already ported to

Re: [Python-Dev] Old libc's isspace() bug on FreeBSD brings back on Mac OS X?

2009-10-02 Thread INADA Naoki
> Confirmed on 10.6 for 2.6.3 and 2.7a0. For 3.2a0 both asserts fail. OK. `s = '\xa0'` should be `s = b'\xa0'`. Should I file a bug? -- Naoki INADA ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev

Re: [Python-Dev] PEP 389: argparse - new command line parsing module

2009-10-02 Thread Toshio Kuratomi
On 09/29/2009 04:38 PM, Steven Bethard wrote: > On Tue, Sep 29, 2009 at 3:04 PM, Glenn Linderman > wrote: >> On approximately 9/29/2009 1:57 PM, came the following characters from the >> keyboard of Steven Bethard: >>> If you're not using argparse to write command line applications, then >>> I do

Re: [Python-Dev] transitioning from % to {} formatting

2009-10-02 Thread Steven Bethard
On Fri, Oct 2, 2009 at 11:56 AM, Raymond Hettinger wrote: > [Steven Bethard] >> Just saying "ok, switch your format strings >> from % to {}" didn't work in Python 3.0 for various good reasons, and >> I can't imagine it will work in Python 4.0 unless we have a transition >> plan. > > Do the users g

Re: [Python-Dev] Old libc's isspace() bug on FreeBSD brings back on Mac OS X?

2009-10-02 Thread Jan Hosang
Confirmed on 10.6 for 2.6.3 and 2.7a0. For 3.2a0 both asserts fail. On 02.10.2009, at 10:29, INADA Naoki wrote: Do you have a testcase that shows what the problem is? Ronald s = '\xa0' assert s.strip() == s import locale locale.setlocale(locale.LC_ALL, 'en_US.UTF-8') 'en_US.UTF-8' assert

Re: [Python-Dev] transitioning from % to {} formatting

2009-10-02 Thread Steven Bethard
On Fri, Oct 2, 2009 at 12:43 PM, Martin Geisler wrote: > I hate calling methods on string literals, I think it looks very odd to > have code like this: > >  "Displaying {0} of {1} revisions".format(x, y) > > Will we be able to write this as > >  "Displaying {0} of {1} revisions" % (x, y) > > too?

[Python-Dev] RELEASED Python 2.6.3

2009-10-02 Thread Barry Warsaw
On behalf of the Python community, I'm happy to announce the availability of Python 2.6.3. This is the latest production-ready version in the Python 2.6 series. Somewhere near 100 bugs have been fixed since Python 2.6.2 was released in April 2009. Please see the NEWS file for all the gor

Re: [Python-Dev] transitioning from % to {} formatting

2009-10-02 Thread Martin Geisler
"Raymond Hettinger" writes: > [Steven Bethard] >>. Just saying "ok, switch your format strings >> from % to {}" didn't work in Python 3.0 for various good reasons, and >> I can't imagine it will work in Python 4.0 unless we have a transition >> plan. > > Do the users get any say in this? I'm a u

Re: [Python-Dev] transitioning from % to {} formatting

2009-10-02 Thread Antoine Pitrou
Raymond Hettinger rcn.com> writes: > > Because there has been limited uptake on {}-formatting (afaict), > we still have limited experience with knowing that it is actually > better, less error-prone, easier to learn/rember, etc. It is known to be quite slower. The following timings are on the p

Re: [Python-Dev] transitioning from % to {} formatting

2009-10-02 Thread Raymond Hettinger
[Steven Bethard] . Just saying "ok, switch your format strings from % to {}" didn't work in Python 3.0 for various good reasons, and I can't imagine it will work in Python 4.0 unless we have a transition plan. Do the users get any say in this? I imagine that some people are heavily invested in

Re: [Python-Dev] Announcing PEP 3136

2009-10-02 Thread Karen Tracey
At 05:15 PM 9/30/2009, Yuvgoog Greenle wrote: I like how python has a minimalistic and powerful syntax (-1 for the break ___ PEP). Also, I really dislike the for/else ambiguity "butterflies". When is the else after a loop executed? 1. When the loop isn't entered at all. 2. When the loop termin

Re: [Python-Dev] transitioning from % to {} formatting

2009-10-02 Thread Steven Bethard
On Fri, Oct 2, 2009 at 2:34 AM, Antoine Pitrou wrote: > Steven Bethard gmail.com> writes: >> >> But it's not much of a transition plan. Or are you suggesting: > > The question is why we want a transition plan that will bother everyone with > no > tangible benefits for the user. I think Guido ex

[Python-Dev] Summary of Python tracker Issues

2009-10-02 Thread Python tracker
ACTIVITY SUMMARY (09/25/09 - 10/02/09) Python tracker at http://bugs.python.org/ To view or respond to any of the issues listed below, click on the issue number. Do NOT respond to this message. 2410 open (+17) / 16447 closed (+24) / 18857 total (+41) Open issues with patches: 958 Average

Re: [Python-Dev] transitioning from % to {} formatting

2009-10-02 Thread Barry Warsaw
On Oct 2, 2009, at 5:34 AM, Antoine Pitrou wrote: Steven Bethard gmail.com> writes: But it's not much of a transition plan. Or are you suggesting: The question is why we want a transition plan that will bother everyone with no tangible benefits for the user. Forcing a transition to {}-

Re: [Python-Dev] transitioning from % to {} formatting

2009-10-02 Thread Antoine Pitrou
Steven Bethard gmail.com> writes: > > But it's not much of a transition plan. Or are you suggesting: The question is why we want a transition plan that will bother everyone with no tangible benefits for the user. Regards Antoine. ___ Python-Dev mai

Re: [Python-Dev] Old libc's isspace() bug on FreeBSD brings back on Mac OS X?

2009-10-02 Thread INADA Naoki
> Do you have a testcase that shows what the problem is? > > Ronald >>> s = '\xa0' >>> assert s.strip() == s >>> import locale >>> locale.setlocale(locale.LC_ALL, 'en_US.UTF-8') 'en_US.UTF-8' >>> assert s.strip() == s Second assert failed on Snow Leopard. -- Naoki INADA __

Re: [Python-Dev] transitioning from % to {} formatting

2009-10-02 Thread Brett Cannon
On Thu, Oct 1, 2009 at 15:19, Steven Bethard wrote: > On Thu, Oct 1, 2009 at 11:03 AM, Brett Cannon wrote: >> So I created this last night: >> >> import collections >> >> class braces_fmt(str): >> >>    def __mod__(self, stuff): >>        if isinstance(stuff, tuple): >>            return self.__c

Re: [Python-Dev] Old libc's isspace() bug on FreeBSD brings back on Mac OS X?

2009-10-02 Thread Ronald Oussoren
On Friday, 02 October, 2009, at 04:07AM, "INADA Naoki" wrote: >I found this hg's issue. >http://mercurial.selenic.com/bts/msg8375 > >I think below fix is not enabled on Mac OS X. >http://svn.python.org/view/python/trunk/Include/pyport.h?view=diff&pathrev=43219&r1=36792&r2=36793 > >I can't confi

Re: [Python-Dev] transitioning from % to {} formatting

2009-10-02 Thread Steven Bethard
On Thu, Oct 1, 2009 at 10:49 PM, Terry Reedy wrote: > As someone who likes .format() and who already uses such bound methods to > print, such as in > > emsg = "...".format > ... >   if c: print(emsg(arg, barg)) > > I find this **MUCH** preferable to the ugly and seemingly unnecessary > wrapper cla