[Python-Dev] converting the stdlib to str.format

Eric Smith eric+python-dev at trueblade.com
Tue Jun 3 11:03:56 CEST 2008


Georg Brandl wrote:
> Martin v. Löwis schrieb:
>>> In any case, I'm willing to give the TLC to convert the whole stdlib
>>> to str.format, so I just need your permission! <wink>
>>
>> Please don't - not before % is actually deprecated (which I hope won't
>> happen until Python 4, with removal of % in Python 5, in the year
>> when I retire, i.e. 2037).
> 
> Now this is news to me -- was there a discussion that changed the
> lifetime expectancy of str.__mod__? I'd always supposed it being
> deprecated at some point in 3.x.
> 
> Not that I'm opposed to keeping it... it *will* be a pain to migrate.

Guido has previously said he wouldn't mind adding a 
PendingDeprecationWarning to %-formatting in 3.0.  I've attempted to do 
that in http://bugs.python.org/issue2772.  For a reason I don't 
understand, my change broke test_doctest.py, so I've never applied it.

Eric.


More information about the Python-Dev mailing list