[Python-Dev] PEP-498: Literal String Formatting

ISAAC J SCHWABACHER ischwabacher at wisc.edu
Wed Aug 12 21:46:55 CEST 2015

Ruby already has this feature, and in my experience syntax highlighters handle it just fine.  Here's what vim's default highlighter shows me:

puts "we can #{
    ["include", "interpolate"].each { |s| puts s }
                              .select { |s| s.include? "erp" }
#                              .first
} arbitrary expressions!"

So an editor whose syntax highlighting is based on regular expressions already can't cope with the world as it is.  :)

Does anyone reading this know of a tool that successfully highlights python but not ruby?


From: Python-Dev <python-dev-bounces+ischwabacher=wisc.edu at python.org> on behalf of Greg Ewing <greg.ewing at canterbury.ac.nz>
Sent: Tuesday, August 11, 2015 18:34
To: python-dev at python.org
Subject: Re: [Python-Dev] PEP-498: Literal String Formatting

Stefan Behnel wrote:
> Syntax highlighting and in-string expression completion should eventually
> help, once IDEs support it.

Concerning that, this is going to place quite a
burden on syntax highlighters. Doing it properly
will require the ability to parse arbitrary Python
expressions, or at least match nested brackets. An
editor whose syntax hightlighting engine is based
on regular expressions could have trouble with


Python-Dev mailing list
Python-Dev at python.org
Unsubscribe: https://mail.python.org/mailman/options/python-dev/ischwabacher%40wisc.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20150812/418ec045/attachment.html>

More information about the Python-Dev mailing list