[Python-Dev] Deprecating the formatter module

Steven D'Aprano steve at pearwood.info
Wed Aug 14 04:22:23 CEST 2013


On 13/08/13 23:36, Brett Cannon wrote:
> On Tue, Aug 13, 2013 at 6:34 AM, Serhiy Storchaka <storchaka at gmail.com>wrote:
>
>> 12.08.13 22:22, Brett Cannon написав(ла):
>>
>>   I have created http://bugs.python.org/**issue18716<http://bugs.python.org/issue18716>to deprecate the
>>> formatter module for removal in Python 3.6 unless someone convinces me
>>> otherwise that deprecation and removal is the wrong move.
>>>
>>
>> The formatter module doesn't look such buggy as the audioop module. If the
>> formatter module was not removed in Python 3.0 I don't see why it can't
>> wait to 4.0.
>
>
> It doesn't help that at PyCon CA we couldn't find a single person who had
> heard of the module (which included people like Alex Gaynor and Larry
> Hastings).


You know, there may be one or two Python programmers who didn't go to PyCon CA... :-)

I knew of formatter before this thread. I've looked at it for use in my own code, but the lack of useful documentation or clear examples put me off, so I put it in the pile of "things to investigate later", but it is definitely a module that interests me.

The documentation for 2.7 claims that it is used by HTMLParser, but that doesn't appear to be true. The claim is removed from the 3.3 documentation.

Over on Python-Ideas mailing list, there are periodic frenzies of requests to delete all sorts of things, e.g. a recent thread debating deleting various string methods in favour of using {} string formatting. My answer there is the same as my answer here: unless the formatter module is actively harmful, then deprecation risks causing more pain than benefit. All those thousands of coders who don't use formatter? The benefit to them of deprecating it is next to zero. That one guy in Uberwald you've never heard of who does use it? It's going to cause him a lot of pain.


-- 
Steven


More information about the Python-Dev mailing list