[Python-Dev] PEP-498: Literal String Formatting
Guido van Rossum
guido at python.org
Mon Aug 17 20:31:14 CEST 2015
On Mon, Aug 17, 2015 at 8:13 AM, Barry Warsaw <barry at python.org> wrote:
> I'm really asking whether it's technically feasible and realistically
> possible
> for them to do so. I'd love to hear from the maintainers of pyflakes,
> pylint,
> Emacs, vim, and other editors, linters, and other static analyzers on a
> rough
> technical assessment of whether they can support this and how much work it
> would be.
>
Those that aren't specific to Python will have to solve a similar problem
for e.g. Swift, which supports \(...) in all strings with arbitrary
expressions in the ..., or Perl which apparently also supports arbitrary
expressions. Heck, even Bash supports something like this,
"...$(command)...".
I am not disinclined in adding some restrictions to make things a little
more tractable, but they would be along the lines of the Swift restriction
(the interpolated expression cannot contain string quotes). However, I do
think we should support f"...{a['key']}...".
--
--Guido van Rossum (python.org/~guido)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20150817/c755794b/attachment-0001.html>
More information about the Python-Dev
mailing list