#28810: Use the Python 3-esque str.format logging formatting style over '%'
-------------------------------------+-------------------------------------
     Reporter:  Chris Lamb           |                    Owner:  nobody
         Type:                       |                   Status:  new
  Cleanup/optimization               |
    Component:  Core (Other)         |                  Version:  1.11
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Chris Lamb):

 Replying to [comment:2 Tim Graham]:
 > I'm not sure why you say "Python 3-esque str.format" in the description.
 `str.format()` was added in Python 2.6.

 I should have used a better suffix than "esque" — it's more that Python 3
 code does tend to *prefer* `str.format` over `%`-style interpolation
 simply as a correlation with it being more modern/newer in general. ie. if
 it's "new enough" for Python 3, it's probably going to be using
 newer/nicer features. It's therefore somewhat surprising to see the
 reverse, hence this proposed change.

 > there's a consensus against using mandating `str.format()` usage
 everwhere in Django and prohibiting the `%s` syntax.

 As it happens, I would be against such a total mandate and a widespread
 change *within* Django, but this is more of a user-exposed thing so a
 different, separate argument IMHO.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/28810#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.50576f7debe3e83362419503a3eb8364%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to