2 ms·
I agree but it's not a popular opinion. I liked the ability to put semi-complex anonymous expressions in format and reference them with {}. If you did this it
by pydry 6y ago
I agree but it's not a popular opinion.
I liked the ability to put semi-complex anonymous expressions in format and reference them with {}. If you did this it was still be obvious what was going on without having to create variable names like comma_separated_list_of_emails.
Technically this is possible in f strings but it leads to an escaping mess. You wouldn't want to put a comprehension with a ','.join in there, for example.
Even when you did use variable names (e.g. "{addr_list}...".format(addr_list=...") you could safely use shorter names because the scope was tighter.