Re: PEP 701 – Syntactic formalization of f- strings
Pablo Galindo Salgado <[email protected]> Wed, 21 Dec 2022 17:29:40 +0000
| Newsgroups | gmane.comp.python.devel |
|---|---|
| Message-ID | <CAFjbc8F0XJEhBSLB_436imkdb+66DNMGNJXfG=MPDF-DoPZw2g@mail.gmail.com> |
--===============5245405888324666692== Content-Type: multipart/alternative; boundary="0000000000006e5f5f05f059e62b" --0000000000006e5f5f05f059e62b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi everyone, For those that are not following the discussion in the discourse thread, I am holding a poll to get an idea of the community opinions on how quotes should work in nested f-strings for PEP 701: https://discuss.python.org/t/pep-701-syntactic-formalization-of-f-strings/2= 2046/24 For us is very important to have everyone represented and every opinion heard and taken into consideration so feel free to vote in the poll leaving your opinion. But please, **read first the PEP and the previous discussion**. This is very important to get the context and previous arguments in favour and against the different options. Thanks a lot for your help! Regards from cloudy London, Pablo Galindo Salgado On Mon, 19 Dec 2022 at 17:59, Pablo Galindo Salgado <[email protected]> wrote: > 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 o= f > 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 accur= ately > implement f-strings. > > *** IMPORTANT: direct all discussions to the discussion thread on > discourse: https://discuss.python.org/t/pep-701-syntactic-formalization-o= f-f-strings/22046 > <https://discuss.python.org/t/pep-701-syntactic-formalization-of-f-string= s/22046> > *** > > Thanks a lot, everyone for your time! > Regards from rainy London, > Pablo Galindo Salgado > --0000000000006e5f5f05f059e62b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-family:verdana,= sans-serif;font-size:small;color:#000000">Hi everyone,</div><div class=3D"g= mail_default" style=3D"font-family:verdana,sans-serif;font-size:small;color= :#000000"><br></div><div class=3D"gmail_default" style=3D"font-family:verda= na,sans-serif;font-size:small;color:#000000">For those that are not followi= ng the discussion in the discourse thread, I am holding a poll to get an id= ea of the community opinions on how quotes should work in nested f-strings = for PEP 701:</div><div class=3D"gmail_default" style=3D"font-family:verdana= ,sans-serif;font-size:small;color:#000000"><br></div><div class=3D"gmail_de= fault" style=3D"font-family:verdana,sans-serif;font-size:small;color:#00000= 0"><a href=3D"https://discuss.python.org/t/pep-701-syntactic-formalization-= of-f-strings/22046/24">https://discuss.python.org/t/pep-701-syntactic-forma= lization-of-f-strings/22046/24</a><br></div><div class=3D"gmail_default" st= yle=3D"font-family:verdana,sans-serif;font-size:small;color:#000000"><br></= div><div class=3D"gmail_default" style=3D"font-family:verdana,sans-serif;fo= nt-size:small;color:#000000">For us is very important to have everyone repr= esented and every opinion heard and taken into=C2=A0consideration so feel f= ree to vote in the poll leaving your opinion. But please, **read first the = PEP and the previous discussion**. This is very important to get the contex= t and previous arguments in favour and against the different options.</div>= <div class=3D"gmail_default" style=3D"font-family:verdana,sans-serif;font-s= ize:small;color:#000000"><br></div><div class=3D"gmail_default" style=3D"fo= nt-family:verdana,sans-serif;font-size:small;color:#000000">Thanks a lot fo= r your help!</div><div class=3D"gmail_default" style=3D"font-family:verdana= ,sans-serif;font-size:small;color:#000000"><br></div><div class=3D"gmail_de= fault" style=3D"font-family:verdana,sans-serif;font-size:small;color:#00000= 0">Regards from cloudy London,</div><div class=3D"gmail_default" style=3D"f= ont-family:verdana,sans-serif;font-size:small;color:#000000">Pablo Galindo = Salgado</div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D= "gmail_attr">On Mon, 19 Dec 2022 at 17:59, Pablo Galindo Salgado <<a hre= f=3D"mailto:[email protected]">[email protected]</a>> wrote:<br></di= v><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;borde= r-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204)= ;padding-left:1ex"><div dir=3D"ltr"><div class=3D"gmail_default"><p style= =3D"margin-top:0px"><font color=3D"#000000" style=3D"background-color:rgb(2= 55,255,255)" face=3D"arial, sans-serif">Hi everyone,</font></p><p><font fac= e=3D"arial, sans-serif"><font color=3D"#000000" style=3D"background-color:r= gb(255,255,255)">I am very excited to share with you a PEP that<span>=C2=A0= </span></font><span style=3D"color:rgb(0,0,0);white-space:pre-wrap">Batuhan= Taskaya, </span><span style=3D"color:rgb(0,0,0);white-space:pre-wrap">Lysa= ndros Nikolaou </span><font color=3D"#000000">and myself have been working = on recently:<span>=C2=A0</span><a href=3D"https://peps.python.org/pep-0701/= " style=3D"text-decoration:none" target=3D"_blank">PEP 701 - PEP 701 =E2=80= =93 Syntactic formalization of f-strings</a>.=C2=A0</font></font></p><p><fo= nt face=3D"arial, sans-serif"><font color=3D"#000000">We believe this will = be a great improvement in both the maintainability of CPython and the usabi= lity of f-strings.</font></font></p><p><font color=3D"#000000" style=3D"bac= kground-color:rgb(255,255,255)" face=3D"arial, sans-serif">We look forward = to hearing what you think about this and to get your feedback!</font></p><p= ><b style=3D"color:rgb(0,0,0);font-family:arial,sans-serif">Here is a TLDR = for your convenience:</b><br></p><ul style=3D"margin:1em 0px 1em 1.25em;pad= ding:0px 0px 0px 1.25em;clear:both"><li><font color=3D"#000000" face=3D"ari= al, sans-serif">The PEP proposes a formalized grammar for f-strings in Pyth= on by adding f-strings directly into the Grammar instead of using a two-pas= s hand-written parser.</font></li><li><font color=3D"#000000" face=3D"arial= , sans-serif">This would lift some existing restrictions for f-strings that= (we believe) will improve the user experience with f-strings.</font></li><= li><font color=3D"#000000" face=3D"arial, sans-serif">Other benefits includ= e:</font><ul style=3D"margin:0px;padding:0px 0px 0px 1.25em;clear:both"><li= ><font color=3D"#000000" face=3D"arial, sans-serif">Reduced maintenance cos= ts for f-string parsing code as well as improved usability for users and li= brary developers.</font></li><li><font color=3D"#000000" face=3D"arial, san= s-serif">Better error messages involving f-strings by leveraging the PEG pa= rser machinery.</font></li><li><font color=3D"#000000" face=3D"arial, sans-= serif">The proposed changes would improve the overall consistency of the la= nguage and provide a way for alternative implementations to accurately impl= ement f-strings.</font></li></ul></li></ul><p><b><font color=3D"#000000" st= yle=3D"background-color:rgb(255,255,255)" face=3D"arial, sans-serif">** IMP= ORTANT: direct all discussions to the discussion thread on discourse:=C2=A0= </font><a href=3D"https://discuss.python.org/t/pep-701-syntactic-formalizat= ion-of-f-strings/22046" target=3D"_blank">https://discuss.python.org/t/pep-= 701-syntactic-formalization-of-f-strings/22046</a> **</b></p><p><font color= =3D"#000000" style=3D"background-color:rgb(255,255,255)" face=3D"arial, san= s-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= > </blockquote></div> --0000000000006e5f5f05f059e62b-- --===============5245405888324666692== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline