<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Jul 21, 2015 at 3:05 PM, Nick Coghlan <span dir="ltr"><<a href="mailto:ncoghlan@gmail.com" target="_blank">ncoghlan@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I wonder though, if we went with the f-strings idea, could we make<br>
them support a *subset* of the "str.format" call syntax, rather than a<br>
superset? What if they supported name and attribute lookup syntax, but<br>
not positional or subscript lookup?<br></blockquote><div><br></div><div>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. :-(<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
They'd still be a great for formatting output in scripts and debugging<br>
messages, but more complex formatting cases would still involve<br>
reaching for str.format,  str.format_map or exec("print(f'{this} is an<br>
odd way to do a {format_map} call')", namespace).<br></blockquote></div><br></div><div class="gmail_extra">You lost me there (probably by trying to be too terse).<br clear="all"></div><div class="gmail_extra"><br>-- <br><div class="gmail_signature">--Guido van Rossum (<a href="http://python.org/~guido" target="_blank">python.org/~guido</a>)</div>
</div></div>