
On Tue, Jul 21, 2015 at 3:05 PM, Nick Coghlan <ncoghlan@gmail.com> wrote:
I wonder though, if we went with the f-strings idea, could we make them support a *subset* of the "str.format" call syntax, rather than a superset? What if they supported name and attribute lookup syntax, but not positional or subscript lookup?
I don't know. Either way there's going to be complaints about the inconsistencies. :-( I wish we hadn't done the {a[x]} part of PEP 3101, but it's too late now. :-(
They'd still be a great for formatting output in scripts and debugging messages, but more complex formatting cases would still involve reaching for str.format, str.format_map or exec("print(f'{this} is an odd way to do a {format_map} call')", namespace).
You lost me there (probably by trying to be too terse). -- --Guido van Rossum (python.org/~guido)