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

2009-10-02 Thread Steven Bethard
On Thu, Oct 1, 2009 at 10:49 PM, Terry Reedy tjre...@udel.edu 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

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 songofaca...@gmail.com 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=diffpathrev=43219r1=36792r2=36793 I

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

2009-10-02 Thread Brett Cannon
On Thu, Oct 1, 2009 at 15:19, Steven Bethard steven.beth...@gmail.com wrote: On Thu, Oct 1, 2009 at 11:03 AM, Brett Cannon br...@python.org wrote: So I created this last night: import collections class braces_fmt(str):    def __mod__(self, stuff):        if isinstance(stuff, tuple):      

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 songofaca...@gmail.com

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

2009-10-02 Thread Antoine Pitrou
Steven Bethard steven.bethard at 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. ___

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 steven.bethard at 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

[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

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

2009-10-02 Thread Steven Bethard
On Fri, Oct 2, 2009 at 2:34 AM, Antoine Pitrou solip...@pitrou.net wrote: Steven Bethard steven.bethard at 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

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

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] transitioning from % to {} formatting

2009-10-02 Thread Antoine Pitrou
Raymond Hettinger python at 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

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

2009-10-02 Thread Martin Geisler
Raymond Hettinger pyt...@rcn.com 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

[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

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

2009-10-02 Thread Steven Bethard
On Fri, Oct 2, 2009 at 12:43 PM, Martin Geisler m...@lazybytes.net 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)

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 11:56 AM, Raymond Hettinger pyt...@rcn.com 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

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 v+pyt...@g.nevcal.com 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,

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 songofaca...@gmail.com ___ Python-Dev mailing list Python-Dev@python.org

[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

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

2009-10-02 Thread Brett Cannon
On Wed, Sep 30, 2009 at 05:29, Paul Moore p.f.mo...@gmail.com wrote: 2009/9/30 Barry Warsaw ba...@python.org: 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'

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 tjre...@udel.edu 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

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 p.f.mo...@gmail.com wrote: 2009/9/30 Mark Dickinson dicki...@gmail.com: 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

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

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

2009-10-02 Thread Benjamin Peterson
2009/10/2 Raymond Hettinger pyt...@rcn.com: [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

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] 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 out,

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 m...@lazybytes.net 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] transitioning from % to {} formatting

2009-10-02 Thread Terry Reedy
Benjamin Peterson wrote: 2009/10/2 Raymond Hettinger pyt...@rcn.com: [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

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 as

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