Hi,

Long story short, I discovered [1] there is no concensus [2] on which 
formatting to use in the Django tutorial.

An argument for % (or against the format method) was 
https://savannah.gnu.org/bugs/?30854 but it has been fixed 5 years ago, its 
stays an argument against f-strings.

It seemed obvious to me that we should favor the use of ".format()" over 
"%-formatting" [3], at least for newcomers (in the tutorial), as they are 
expected to run work up-to-date Python interpreters.

It also make it smoother for them to step on (or convert to to) f-strings 
from the ".format" mini-language than from the "%s" notation. And for those 
using 3.6+, using f-string is clearly more readable than .format or % (As 
long as they don't have to do i18n on those f-strings).

The thread in [1] is 5 years old, so I'm starting a new one to see if we 
can reach a concensus in 2018—2019 about not driving newcomers to use 
%-formatting.

What do you think?

[1]: https://github.com/django/django/pull/10590/files
[2]: 
https://groups.google.com/forum/#!topic/django-developers/7xiXlz5DUWM/discussion
[3]: 
https://docs.python.org/3/library/stdtypes.html#printf-style-string-formatting

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/7d1b83e0-21b5-4a85-97f4-4217a0c7a243%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to