On 24 August 2012 18:12, Carl Meyer <[email protected]> wrote:
> Can you link to where in the current docs it specifies that %-formatting
> is deprecated and/or will be removed? I can't even find, on a cursory
> search, where it says the new .format() style should be preferred.

It's not easy to find - I've only found the mention of the impending
deprecation in the Python 3.0 "What's New" docs -
http://docs.python.org/release/3.0/whatsnew/3.0.html#pep-3101-a-new-approach-to-string-formatting

However, I can't find followup references to that in the Python 3.1
docs. Maybe the decision was rescinded? Personally I didn't really see
anything majorly wrong with the %-style formatting. Being a C
developer myself, it was nice to have some common ground and not have
to go hunting for format string specifications.

This section http://docs.python.org/library/stdtypes.html#str.format
states "This method of string formatting is the new standard in Python
3, and should be preferred to the % formatting described in String
Formatting Operations in new code."

I just thought that if the %-style formatting is indeed earmarked for
removal, maybe we should start using the new format sooner rather than
later.

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to