I'm going to float this here, just to make sure it's considered...

`format()` allows positional and named kwargs in format strings: 

"First, thou shalt count to {0}"  # References first positional argument
"Bring me a {}"                   # Implicitly references the first 
positional argument
"From {} to {}"                   # Same as "From {0} to {1}"
"My quest is {name}"              # References keyword argument 'name'
"Weight in tons {0.weight}"       # 'weight' attribute of first positional 
arg
"Units destroyed: {players[0]}"   # First element of keyword argument 
'players'.

Are these *never* useful? 

Certainly 99% of cases can be handled as cleanly (or more so, because I 
guess we fell `format()` is a little verbose) with %-formatting or an 
f-string. 
But if we say format() is not allowed, don't we then guarantee we hit the 
one case in X where "Actually, this version with format() is much cleaner"? 


-- 
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 django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/69ec080c-9d2c-4020-89df-4062ec49405do%40googlegroups.com.

Reply via email to