Hi Daniel, On 08/24/2012 09:56 AM, Daniel Swarbrick wrote: > Since Django 1.5 has set the minimum version of Python at 2.6, and in > conjunction with the push to make Django more Python 3 compatible, > should we slowly start migrating to the new format string [1] syntax? > The Python docs state that it is the new standard in Python 3, and > should be preferred to the old %-style formatting. The %-style was > supposed to be deprecated in Python 3.1. Whilst I'm a little vague on > whether it's been officially deprecated yet, it is slated to be removed > from Python altogether at some point.
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. I'm asking because I've seen Python core devs state quite strongly on python-dev that there are no plans for deprecating or removing %-formatting in Python 3. See e.g. http://mail.python.org/pipermail/python-dev/2012-February/116800.html and ensuing thread. Given that, I'm not sure it's worth any effort at all to transition the Django codebase (and as long as it does what we need, it may be best to stick with %-formatting in new code as well, just to maintain consistency). Carl
signature.asc
Description: OpenPGP digital signature
