A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2008-June/080030.html below:

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

[Python-Dev] converting the stdlib to str.formatNick Coghlan ncoghlan at gmail.com
Wed Jun 4 12:23:08 CEST 2008
Martin v. Löwis wrote:
>>> 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.
> 
> The PEP doesn't specify anything, and I don't recall any discussion,
> either - the specific timing suggested above is merely my own hopes.

While str.format has an awful lot of points in its favour (no tuple/dict 
special casing, much cleaner handling of named arguments, access to 
format options for non-builtin types), there are some debugging cases 
where I suspect the basic version of % formatting will prove to be more 
convenient.

At this point in time, my personal preference would be that later in the 
3.x series certain aspects of % formatting will be deprecated 
(acceptance of non-tuples in favour of the format() builtin, acceptance 
of dicts in favour of str.format), but that simple % formatting of a 
tuple of values will still be permitted.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------
             http://www.boredomandlaziness.org
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4