[Python-Dev] Status regarding Old vs. Advanced String Formating (original) (raw)
Ethan Furman ethan at stoneleaf.us
Fri Feb 24 18:00:12 CET 2012
- Previous message: [Python-Dev] Status regarding Old vs. Advanced String Formating
- Next message: [Python-Dev] Status regarding Old vs. Advanced String Formating
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Tshepang Lekhonkhobe wrote:
Hi,
I was of the thought that Old String Formatting |"%s" % foo| was to be phased out by Advanced String Formatting |"{}.format(foo)|. I however keep seeing new code committed into the main VCS using the old style. Is this okay? Is there a policy? I ask also because I expect CPython to lead by example. On another note, will the old format ever be deprecated? Is there a date?
Brett Cannon wrote:
On Tue, Feb 22, 2011 at 10:43, Ethan Furman wrote:
Greetings!
According to these release notes in Python 3.0, %-formatting will be going away.
http://docs.python.org/release/3.0.1/whatsnew/3.0.html#pep-3101-a-new-approach-to-string-formatting
However, I was unable to find any further evidence of actual deprecation in 3.1 or 3.2... does anybody know the status of this?
There isn't one. =)
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. =)
- Previous message: [Python-Dev] Status regarding Old vs. Advanced String Formating
- Next message: [Python-Dev] Status regarding Old vs. Advanced String Formating
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]