Re: PEP 638: Syntactic macros
Stéfane Fermigier <[email protected]> Fri, 3 Feb 2023 16:48:51 +0100
| Newsgroups | gmane.comp.python.devel |
|---|---|
| Message-ID | <CABuJJj5XZyvkNBKxTe0OGxVQjdxH11e8APsLjqMc2H_7X=U_fQ@mail.gmail.com> |
--===============0704640259532011619== Content-Type: multipart/alternative; boundary="000000000000e2be2b05f3cd9ed6" --000000000000e2be2b05f3cd9ed6 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable " On Fri, Feb 3, 2023 at 12:28 PM Stephen J. Turnbull < [email protected]> wrote: > St=C3=A9fane Fermigier writes: > > > NB: on a very basic level, I remember trying, a few years ago, to use > the > > Unicode "empty set" symbol as a synonym for set(), and it didn't end > well, > > for several reasons, including the fact that Python didn't like it as = a > > variable name. > > I know about the issue that '=E2=88=85' is not valid in identifiers, but = I'm > curious about these other "several reasons". > IIRC (this was a few years back): '=E2=88=85' (aka EMPTY SET) was not acce= pted by Python, so I used instead ''=C3=98" (aka "LATIN CAPITAL LETTER O WITH STROK= E"). Python was OK with it, but some of the tools I use (one of flake8, isort, black... or maybe one of my IDE) barfed on it. S. --=20 Stefane Fermigier - http://fermigier.com/ - http://twitter.com/sfermigier - http://linkedin.com/in/sfermigier Founder & CEO, Abilian - Enterprise Social Software - http://www.abilian.com/ Co-Founder & Co-Chairman, National Council for Free & Open Source Software (CNLL) - http://cnll.fr/ Co-Founder & Chairman, Association Professionnelle Europ=C3=A9enne du Logic= iel Libre (APELL) - https://www.apell.info/ Co-Founder & Spokesperson, European Cloud Industrial Alliance (EUCLIDIA) - https://www.euclidia.eu/ "I wish you were as accurate, & as much to be relied on, as I am myself" - Lady Ada Lovelace --000000000000e2be2b05f3cd9ed6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">"<div dir=3D"ltr"><br></div><br><div class=3D"gmail_q= uote"><div dir=3D"ltr" class=3D"gmail_attr">On Fri, Feb 3, 2023 at 12:28 PM= Stephen J. Turnbull <<a href=3D"mailto:[email protected]">step= [email protected]</a>> wrote:<br></div><blockquote class=3D"gmail_q= uote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,2= 04);padding-left:1ex">St=C3=A9fane Fermigier writes:<br> <br> =C2=A0> NB: on a very basic level, I remember trying, a few years ago, t= o use the<br> =C2=A0> Unicode "empty set" symbol as a synonym for set(), and= it didn't end well,<br> =C2=A0> for several reasons, including the fact that Python didn't l= ike it as a<br> =C2=A0> variable name.<br> <br> I know about the issue that '=E2=88=85' is not valid in identifiers= , but I'm<br> curious about these other "several reasons".<br></blockquote><div= ><br></div><div>IIRC (this was a few years back):=C2=A0 '=E2=88=85'= (aka EMPTY SET) was not accepted by Python, so I used instead ''= =C3=98" (aka "LATIN CAPITAL LETTER O WITH STROKE"). <br></di= v><div><br></div><div>Python was OK with it, but some of the tools I use (o= ne of flake8, isort, black... or maybe one of my IDE) barfed on it.<br></di= v><div><br></div><div>=C2=A0 S.</div><div><br></div></div>-- <br><div dir= =3D"ltr" class=3D"gmail_signature"><div dir=3D"ltr"><div><div dir=3D"ltr"><= div><div dir=3D"ltr"><div><div dir=3D"ltr"><div><div dir=3D"ltr"><div dir= =3D"ltr"><div dir=3D"ltr"><div dir=3D"ltr">Stefane Fermigier - <a href=3D"h= ttp://fermigier.com/" target=3D"_blank">http://fermigier.com/</a> - <a href= =3D"http://twitter.com/sfermigier" target=3D"_blank">http://twitter.com/sfe= rmigier</a> - <a href=3D"http://linkedin.com/in/sfermigier" target=3D"_blan= k">http://linkedin.com/in/sfermigier</a><br>Founder & CEO, Abilian - En= terprise Social Software - <a href=3D"http://www.abilian.com/" target=3D"_b= lank">http://www.abilian.com/</a></div><div dir=3D"ltr">Co-Founder & Co= -Chairman, National Council for Free & Open Source Software (CNLL) - <a= href=3D"http://cnll.fr/" target=3D"_blank">http://cnll.fr/</a></div><div d= ir=3D"ltr">Co-Founder & Chairman, Association Professionnelle Europ=C3= =A9enne du Logiciel Libre (APELL) -=C2=A0<a href=3D"https://www.apell.info/= " target=3D"_blank">https://www.apell.info/</a></div><div dir=3D"ltr">Co-Fo= under & Spokesperson, European Cloud Industrial Alliance (EUCLIDIA) -= =C2=A0<a href=3D"https://www.euclidia.eu/" target=3D"_blank">https://www.eu= clidia.eu/</a> <br></div><div dir=3D"ltr"><br></div><div dir=3D"ltr">"= <span>I wish you were as accurate, & as much to be relied on, as I am = myself" - Lady Ada Lovelace<br></span></div></div></div></div></div></= div></div></div></div></div></div></div></div></div> --000000000000e2be2b05f3cd9ed6-- --===============0704640259532011619== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline