PEP 701 – Syntactic formalization of f-string s
Pablo Galindo Salgado <[email protected]> Mon, 19 Dec 2022 17:59:04 +0000
| Newsgroups | gmane.comp.python.devel |
|---|---|
| Message-ID | <CAFjbc8GtYZLaAJovmsooqG3=1sZJo_0ifqFnJQBK6dfCOY-1Lw@mail.gmail.com> |
--===============2336507640674656018==
Content-Type: multipart/alternative; boundary="000000000000fbbf8005f0321362"
--000000000000fbbf8005f0321362
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Hi everyone,
I am very excited to share with you a PEP that Batuhan Taskaya, Lysandros
Nikolaou and myself have been working on recently: PEP 701 - PEP 701 =E2=80=
=93
Syntactic formalization of f-strings <https://peps.python.org/pep-0701/>.
We believe this will be a great improvement in both the maintainability of
CPython and the usability of f-strings.
We look forward to hearing what you think about this and to get your
feedback!
*Here is a TLDR for your convenience:*
- The PEP proposes a formalized grammar for f-strings in Python by
adding f-strings directly into the Grammar instead of using a two-pass
hand-written parser.
- This would lift some existing restrictions for f-strings that (we
believe) will improve the user experience with f-strings.
- Other benefits include:
- Reduced maintenance costs for f-string parsing code as well as
improved usability for users and library developers.
- Better error messages involving f-strings by leveraging the PEG
parser machinery.
- The proposed changes would improve the overall consistency of the
language and provide a way for alternative implementations to accurat=
ely
implement f-strings.
*** IMPORTANT: direct all discussions to the discussion thread on
discourse: https://discuss.python.org/t/pep-701-syntactic-formalization-of-=
f-strings/22046
<https://discuss.python.org/t/pep-701-syntactic-formalization-of-f-strings/=
22046>
***
Thanks a lot, everyone for your time!
Regards from rainy London,
Pablo Galindo Salgado
--000000000000fbbf8005f0321362
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div class=3D"gmail_default"><p style=3D"margin-top:0px"><=
font color=3D"#000000" style=3D"background-color:rgb(255,255,255)" face=3D"=
arial, sans-serif">Hi everyone,</font></p><p style=3D"caret-color: rgb(238,=
238, 238);"><font face=3D"arial, sans-serif"><font color=3D"#000000" style=
=3D"background-color:rgb(255,255,255)">I am very excited to share with you =
a PEP that<span class=3D"gmail-Apple-converted-space">=C2=A0</span></font><=
span style=3D"color:rgb(0,0,0);white-space:pre-wrap">Batuhan Taskaya, </spa=
n><span style=3D"color:rgb(0,0,0);white-space:pre-wrap">Lysandros Nikolaou =
</span><font color=3D"#000000">and myself have been working on recently:<sp=
an class=3D"gmail-Apple-converted-space">=C2=A0</span><a href=3D"https://pe=
ps.python.org/pep-0701/" style=3D"text-decoration:none">PEP 701 - PEP 701 =
=E2=80=93 Syntactic formalization of f-strings</a>.=C2=A0</font></font></p>=
<p style=3D"caret-color: rgb(238, 238, 238);"><font face=3D"arial, sans-ser=
if"><font color=3D"#000000">We believe this will be a great improvement in =
both the maintainability of CPython and the usability of f-strings.</font><=
/font></p><p style=3D"caret-color: rgb(238, 238, 238);"><font color=3D"#000=
000" style=3D"background-color:rgb(255,255,255)" face=3D"arial, sans-serif"=
>We look forward to hearing what you think about this and to get your feedb=
ack!</font></p><p style=3D"caret-color: rgb(238, 238, 238);"><b style=3D"co=
lor:rgb(0,0,0);font-family:arial,sans-serif">Here is a TLDR for your conven=
ience:</b><br></p><ul style=3D"margin:1em 0px 1em 1.25em;padding:0px 0px 0p=
x 1.25em;clear:both"><li><font color=3D"#000000" face=3D"arial, sans-serif"=
>The PEP proposes a formalized grammar for f-strings in Python by adding f-=
strings directly into the Grammar instead of using a two-pass hand-written =
parser.</font></li><li><font color=3D"#000000" face=3D"arial, sans-serif">T=
his would lift some existing restrictions for f-strings that (we believe) w=
ill improve the user experience with f-strings.</font></li><li><font color=
=3D"#000000" face=3D"arial, sans-serif">Other benefits include:</font><ul s=
tyle=3D"margin:0px;padding:0px 0px 0px 1.25em;clear:both"><li><font color=
=3D"#000000" face=3D"arial, sans-serif">Reduced maintenance costs for f-str=
ing parsing code as well as improved usability for users and library develo=
pers.</font></li><li><font color=3D"#000000" face=3D"arial, sans-serif">Bet=
ter error messages involving f-strings by leveraging the PEG parser machine=
ry.</font></li><li><font color=3D"#000000" face=3D"arial, sans-serif">The p=
roposed changes would improve the overall consistency of the language and p=
rovide a way for alternative implementations to accurately implement f-stri=
ngs.</font></li></ul></li></ul><p style=3D"caret-color: rgb(238, 238, 238);=
"><b><font color=3D"#000000" style=3D"background-color:rgb(255,255,255)" fa=
ce=3D"arial, sans-serif">** IMPORTANT: direct all discussions to the discus=
sion thread on discourse:=C2=A0</font><a href=3D"https://discuss.python.org=
/t/pep-701-syntactic-formalization-of-f-strings/22046">https://discuss.pyth=
on.org/t/pep-701-syntactic-formalization-of-f-strings/22046</a> **</b></p><=
p style=3D"caret-color: rgb(238, 238, 238);"><font color=3D"#000000" style=
=3D"background-color:rgb(255,255,255)" face=3D"arial, sans-serif">Thanks a =
lot, everyone for your time!</font></p>Regards from rainy London,</div><div=
class=3D"gmail_default">Pablo Galindo Salgado</div></div>
--000000000000fbbf8005f0321362--
--===============2336507640674656018==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline