Re: [Python-Dev] format, int, and IntEnum

2013-08-14 Thread Glenn Linderman
On 8/14/2013 9:27 PM, Nick Coghlan wrote: I think Eric is overinterpreting the spec, there. While that particular sentence requires that the empty format string will be equivalent to a plain str() operation for builtin types, it is only a recommendation for other types. For enums, I believe t

Re: [Python-Dev] format, int, and IntEnum

2013-08-14 Thread Nick Coghlan
I think Eric is overinterpreting the spec, there. While that particular sentence requires that the empty format string will be equivalent to a plain str() operation for builtin types, it is only a recommendation for other types. For enums, I believe they should be formatted like their base types (s

Re: [Python-Dev] format and int subclasses (Was: format, int, and IntEnum)

2013-08-14 Thread Eli Bendersky
On Wed, Aug 14, 2013 at 4:01 PM, Serhiy Storchaka wrote: > 15.08.13 01:07, Ethan Furman написав(ла): > >> From http://bugs.python.org/**issue18738 >> : >> > > Actually the problem not only in IntEnum, but in any in subclass. > > Currently for empty format specif

Re: [Python-Dev] PEP 450 adding statistics module

2013-08-14 Thread Terry Reedy
On 8/14/2013 9:25 PM, Steven D'Aprano wrote: The tests aren't yet integrated with the test runner but are runnable manually. What do you mean? With the changes I gave you, they run fine as part of the test suite. -- Terry Jan Reedy ___ Python-Dev

Re: [Python-Dev] Deprecating the formatter module

2013-08-14 Thread Steven D'Aprano
On 15/08/13 01:08, Brett Cannon wrote: On Tue, Aug 13, 2013 at 10:22 PM, Steven D'Aprano wrote: On 13/08/13 23:36, Brett Cannon wrote: On Tue, Aug 13, 2013 at 6:34 AM, Serhiy Storchaka wrote: 12.08.13 22:22, Brett Cannon написав(ла): I have created http://bugs.python.org/issue1

[Python-Dev] PEP 450 adding statistics module

2013-08-14 Thread Steven D'Aprano
Hi all, I have raised a tracker item and PEP for adding a statistics module to the standard library: http://bugs.python.org/issue18606 http://www.python.org/dev/peps/pep-0450/ There has been considerable discussion on python-ideas, which is now reflected by the PEP. I've signed the Contribut

[Python-Dev] format and int subclasses (Was: format, int, and IntEnum)

2013-08-14 Thread Serhiy Storchaka
15.08.13 01:07, Ethan Furman написав(ла): From http://bugs.python.org/issue18738: Actually the problem not only in IntEnum, but in any in subclass. Currently for empty format specifier int.__format__(x, '') returns str(x). But __str__ can be overloaded in a subclass. I think that for less s

[Python-Dev] format, int, and IntEnum

2013-08-14 Thread Ethan Furman
From http://bugs.python.org/issue18738: Ethan Furman commented: --> class Test(enum.IntEnum): ... one = 1 ... two = 2 ... --> '{}'.format(Test.one) 'Test.one' --> '{:d}'.format(Test.one) '1' --> '{:}'.format(Test.one) 'Test.one' --> '{:10}'.format(Test.one) ' 1' Eric V. Smith c

Re: [Python-Dev] Deprecating the formatter module

2013-08-14 Thread Eli Bendersky
On Wed, Aug 14, 2013 at 11:37 AM, Terry Reedy wrote: > On 8/14/2013 12:09 PM, Nick Coghlan wrote: > >> On 14 August 2013 11:55, Brett Cannon wrote: >> > > I view a deprecation as the same thing. If we leave the module in until >>> Python 4 then I can live with that, but simply moving documentat

Re: [Python-Dev] Deprecating the formatter module

2013-08-14 Thread Terry Reedy
On 8/14/2013 12:09 PM, Nick Coghlan wrote: On 14 August 2013 11:55, Brett Cannon wrote: I view a deprecation as the same thing. If we leave the module in until Python 4 then I can live with that, but simply moving documentation around is not enough to communicate to those who didn't read the

Re: [Python-Dev] Deprecating the formatter module

2013-08-14 Thread Brett Cannon
On Wed, Aug 14, 2013 at 1:50 PM, Chris Angelico wrote: > On Wed, Aug 14, 2013 at 6:42 PM, Nick Coghlan wrote: > > That would be PEP 4 :) > > What's the normal way to update a PEP? > > ... proposals for deprecating modules MUST be made by providing a > change to the text of this PEP, whic

Re: [Python-Dev] Deprecating the formatter module

2013-08-14 Thread Chris Angelico
On Wed, Aug 14, 2013 at 6:42 PM, Nick Coghlan wrote: > That would be PEP 4 :) What's the normal way to update a PEP? ... proposals for deprecating modules MUST be made by providing a change to the text of this PEP, which SHOULD be a patch posted to SourceForge...""" Would that now b

Re: [Python-Dev] Deprecating the formatter module

2013-08-14 Thread Nick Coghlan
On 14 August 2013 12:17, Eli Bendersky wrote: > On Wed, Aug 14, 2013 at 9:09 AM, Nick Coghlan wrote: >> >> On 14 August 2013 11:55, Brett Cannon wrote: >> > I view a deprecation as the same thing. If we leave the module in until >> > Python 4 then I can live with that, but simply moving document

Re: [Python-Dev] Deprecating the formatter module

2013-08-14 Thread Skip Montanaro
> We then realized that it isn't really used by anyone (pydoc uses it but it > should have been using textwrap). Looking at the history of the module it > has just been a magnet for cleanup revisions and not actual usage or > development since Guido added it back in 1995. Note that it is/was used

Re: [Python-Dev] Deprecating the formatter module

2013-08-14 Thread MRAB
On 14/08/2013 17:17, Eli Bendersky wrote: On Wed, Aug 14, 2013 at 9:09 AM, Nick Coghlan mailto:ncogh...@gmail.com>> wrote: On 14 August 2013 11:55, Brett Cannon mailto:br...@python.org>> wrote: > On Wed, Aug 14, 2013 at 11:47 AM, Nick Coghlan mailto:ncogh...@gmail.com>> wrote:

Re: [Python-Dev] Deprecating the formatter module

2013-08-14 Thread Brett Cannon
On Wed, Aug 14, 2013 at 12:09 PM, Nick Coghlan wrote: > On 14 August 2013 11:55, Brett Cannon wrote: > > On Wed, Aug 14, 2013 at 11:47 AM, Nick Coghlan > wrote: > >> > >> On 14 August 2013 11:08, Brett Cannon wrote: > >> > We take adding a module to the stdlib very seriously for all of these >

Re: [Python-Dev] Deprecating the formatter module

2013-08-14 Thread Eli Bendersky
On Wed, Aug 14, 2013 at 9:09 AM, Nick Coghlan wrote: > On 14 August 2013 11:55, Brett Cannon wrote: > > On Wed, Aug 14, 2013 at 11:47 AM, Nick Coghlan > wrote: > >> > >> On 14 August 2013 11:08, Brett Cannon wrote: > >> > We take adding a module to the stdlib very seriously for all of these >

Re: [Python-Dev] Deprecating the formatter module

2013-08-14 Thread Nick Coghlan
On 14 August 2013 11:55, Brett Cannon wrote: > On Wed, Aug 14, 2013 at 11:47 AM, Nick Coghlan wrote: >> >> On 14 August 2013 11:08, Brett Cannon wrote: >> > We take adding a module to the stdlib very seriously for all of these >> > reasons and yet people seem to forget that the exact same reason

Re: [Python-Dev] Deprecating the formatter module

2013-08-14 Thread Brett Cannon
On Wed, Aug 14, 2013 at 11:47 AM, Nick Coghlan wrote: > On 14 August 2013 11:08, Brett Cannon wrote: > > We take adding a module to the stdlib very seriously for all of these > > reasons and yet people seem to forget that the exact same reasons apply > to > > modules already in the stdlib, wheth

Re: [Python-Dev] Deprecating the formatter module

2013-08-14 Thread Nick Coghlan
On 14 August 2013 11:08, Brett Cannon wrote: > We take adding a module to the stdlib very seriously for all of these > reasons and yet people seem to forget that the exact same reasons apply to > modules already in the stdlib, whether they would be added today or not (and > in this instance I woul

Re: [Python-Dev] Deprecating the formatter module

2013-08-14 Thread Antoine Pitrou
Le Wed, 14 Aug 2013 11:08:29 -0400, Brett Cannon a écrit : > > > > You know, there may be one or two Python programmers who didn't go > > to PyCon CA... :-) > > > > Sure, but you would assume at least *one* person would have known of > the module in a room of sprinters. Not necessarily. There ar

Re: [Python-Dev] Deprecating the formatter module

2013-08-14 Thread Brett Cannon
On Tue, Aug 13, 2013 at 10:22 PM, Steven D'Aprano wrote: > On 13/08/13 23:36, Brett Cannon wrote: > >> On Tue, Aug 13, 2013 at 6:34 AM, Serhiy Storchaka > >wrote: >> >> 12.08.13 22:22, Brett Cannon написав(ла): >>> >>> I have created >>> http://bugs.python.org/issue18716

Re: [Python-Dev] Dealing with import lock deadlock in Import Hooks

2013-08-14 Thread Antoine Pitrou
Le Wed, 14 Aug 2013 14:17:59 +0900, Arnaud Fontaine a écrit : > Antoine Pitrou writes: > > > Le Tue, 13 Aug 2013 17:28:42 +0900, Arnaud Fontaine > > a écrit : > >> Yes. Actually, I was thinking about implementing something similar > >> to what has been done in Python 3.3 but for Python 2.7 with

Re: [Python-Dev] Dealing with import lock deadlock in Import Hooks

2013-08-14 Thread Arnaud Fontaine
Antoine Pitrou writes: > Le Tue, 13 Aug 2013 17:28:42 +0900, Arnaud Fontaine > a écrit : >> Yes. Actually, I was thinking about implementing something similar to >> what has been done in Python 3.3 but for Python 2.7 with a >> corser-grain lock. From my understanding of import.c, it should work