[Python-Dev] %-formatting depracation

Antoine Pitrou solipsis at pitrou.net
Tue Feb 22 23:03:00 CET 2011


On Wed, 23 Feb 2011 07:52:23 +1000
Nick Coghlan <ncoghlan at gmail.com> wrote:

> On Wed, Feb 23, 2011 at 4:51 AM, Brett Cannon <brett at python.org> wrote:
> > The very long term view is for %-formatting to go away, but that's as far as
> > the thinking has gone. There are currently no plans to introduce any
> > deprecation warning, and I highly doubt we will even remove the feature in
> > Python 3, giving you probably at least another decade of use at our current
> > major version release schedule. =)
> 
> This. Without a systematic way to detect and convert %-style to
> {}-style formatting, enforcing the switch in the 3.x series just isn't
> practical. Heck, we still haven't figured out how to convert a lot of
> higher level APIs to the new scheme in a backwards compatible way
> (that's why modules like logging still default to %-style, with
> {}-style only available via options and wrapper objects).

I think there are many people still finding %-style more practical for
simple uses, so this might be a case of "practicality beats purity"
over "there should be one obvious way to do it".

Regards

Antoine.




More information about the Python-Dev mailing list