Re: PEP 638: Syntactic macros

Jelle Zijlstra <[email protected]> Fri, 3 Feb 2023 08:52:41 -0800
Newsgroups gmane.comp.python.devel
Message-ID <CAFp3-p-MBUi7ZW7fPsbEFv3EuzTrM3qHzX0Mg5K=KLW0Nh96Bw@mail.gmail.com>
--===============8553807973185196686==
Content-Type: multipart/alternative; boundary="000000000000222d4905f3ce83c3"

--000000000000222d4905f3ce83c3
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

El vie, 3 feb 2023 a las 8:01, St=C3=A9fane Fermigier (<[email protected]>)
escribi=C3=B3:

> "
>
>
> 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 ac=
cepted by
> Python, so I used instead ''=C3=98" (aka "LATIN CAPITAL LETTER O WITH STR=
OKE").
>
> 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.
>

Black is fine with it; we've had the empty set symbol in our own source
code since the beginning (
https://github.com/psf/black/blob/b0d1fba7ac3be53c71fb0d3211d911e629f8aecb/=
src/black/linegen.py#L455
now). I believe we've had someone ask that we remove it because it was
breaking some tool that was processing the Black source code, but =C5=81uka=
sz
wasn't having it.


>
>   S.
>
> --
> 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 Softwar=
e
> (CNLL) - http://cnll.fr/
> Co-Founder & Chairman, Association Professionnelle Europ=C3=A9enne du Log=
iciel
> 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
> _______________________________________________
> Python-Dev mailing list -- [email protected]
> To unsubscribe send an email to [email protected]
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at
> https://mail.python.org/archives/list/[email protected]/message/H2UAL=
G4YAA6IBMZQMWEL2QIOPDPK4RTG/
> Code of Conduct: http://python.org/psf/codeofconduct/
>

--000000000000222d4905f3ce83c3
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_quote">=
<div dir=3D"ltr" class=3D"gmail_attr">El vie, 3 feb 2023 a las 8:01, St=C3=
=A9fane Fermigier (&lt;<a href=3D"mailto:[email protected]">[email protected]=
</a>&gt;) escribi=C3=B3:<br></div><blockquote class=3D"gmail_quote" style=
=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding=
-left:1ex"><div dir=3D"ltr">&quot;<div dir=3D"ltr"><br></div><br><div class=
=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Fri, Feb 3, 2023 =
at 12:28 PM Stephen J. Turnbull &lt;<a href=3D"mailto:stephenjturnbull@gmai=
l.com" target=3D"_blank">[email protected]</a>&gt; wrote:<br></div=
><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border=
-left:1px solid rgb(204,204,204);padding-left:1ex">St=C3=A9fane Fermigier w=
rites:<br>
<br>
=C2=A0&gt; NB: on a very basic level, I remember trying, a few years ago, t=
o use the<br>
=C2=A0&gt; Unicode &quot;empty set&quot; symbol as a synonym for set(), and=
 it didn&#39;t end well,<br>
=C2=A0&gt; for several reasons, including the fact that Python didn&#39;t l=
ike it as a<br>
=C2=A0&gt; variable name.<br>
<br>
I know about the issue that &#39;=E2=88=85&#39; is not valid in identifiers=
, but I&#39;m<br>
curious about these other &quot;several reasons&quot;.<br></blockquote><div=
><br></div><div>IIRC (this was a few years back):=C2=A0 &#39;=E2=88=85&#39;=
 (aka EMPTY SET) was not accepted by Python, so I used instead &#39;&#39;=
=C3=98&quot; (aka &quot;LATIN CAPITAL LETTER O WITH STROKE&quot;). <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></div></blockquote><div><br></div><div>Black is fine with it; we&#3=
9;ve had the empty set symbol in our own source code since the beginning (<=
a href=3D"https://github.com/psf/black/blob/b0d1fba7ac3be53c71fb0d3211d911e=
629f8aecb/src/black/linegen.py#L455">https://github.com/psf/black/blob/b0d1=
fba7ac3be53c71fb0d3211d911e629f8aecb/src/black/linegen.py#L455</a> now). I =
believe we&#39;ve had someone ask that we remove it because it was breaking=
 some tool that was processing the Black source code, but=C2=A0=C5=81ukasz =
wasn&#39;t having it.</div><div>=C2=A0</div><blockquote class=3D"gmail_quot=
e" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204)=
;padding-left:1ex"><div dir=3D"ltr"><div class=3D"gmail_quote"><div></div><=
div><br></div><div>=C2=A0 S.</div><div><br></div></div>-- <br><div dir=3D"l=
tr"><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 di=
r=3D"ltr">Stefane Fermigier - <a href=3D"http://fermigier.com/" target=3D"_=
blank">http://fermigier.com/</a> - <a href=3D"http://twitter.com/sfermigier=
" target=3D"_blank">http://twitter.com/sfermigier</a> - <a href=3D"http://l=
inkedin.com/in/sfermigier" target=3D"_blank">http://linkedin.com/in/sfermig=
ier</a><br>Founder &amp; CEO, Abilian - Enterprise Social Software - <a hre=
f=3D"http://www.abilian.com/" target=3D"_blank">http://www.abilian.com/</a>=
</div><div dir=3D"ltr">Co-Founder &amp; Co-Chairman, National Council for F=
ree &amp; Open Source Software (CNLL) - <a href=3D"http://cnll.fr/" target=
=3D"_blank">http://cnll.fr/</a></div><div dir=3D"ltr">Co-Founder &amp; Chai=
rman, Association Professionnelle Europ=C3=A9enne du Logiciel Libre (APELL)=
 -=C2=A0<a href=3D"https://www.apell.info/" target=3D"_blank">https://www.a=
pell.info/</a></div><div dir=3D"ltr">Co-Founder &amp; Spokesperson, Europea=
n Cloud Industrial Alliance (EUCLIDIA) -=C2=A0<a href=3D"https://www.euclid=
ia.eu/" target=3D"_blank">https://www.euclidia.eu/</a> <br></div><div dir=
=3D"ltr"><br></div><div dir=3D"ltr">&quot;<span>I wish you were as accurate=
,  &amp; as much to be relied on, as I am myself&quot; - Lady Ada Lovelace<=
br></span></div></div></div></div></div></div></div></div></div></div></div=
></div></div></div>
_______________________________________________<br>
Python-Dev mailing list -- <a href=3D"mailto:[email protected]" target=
=3D"_blank">[email protected]</a><br>
To unsubscribe send an email to <a href=3D"mailto:[email protected]=
rg" target=3D"_blank">[email protected]</a><br>
<a href=3D"https://mail.python.org/mailman3/lists/python-dev.python.org/" r=
el=3D"noreferrer" target=3D"_blank">https://mail.python.org/mailman3/lists/=
python-dev.python.org/</a><br>
Message archived at <a href=3D"https://mail.python.org/archives/list/python=
[email protected]/message/H2UALG4YAA6IBMZQMWEL2QIOPDPK4RTG/" rel=3D"noreferre=
r" target=3D"_blank">https://mail.python.org/archives/list/python-dev@pytho=
n.org/message/H2UALG4YAA6IBMZQMWEL2QIOPDPK4RTG/</a><br>
Code of Conduct: <a href=3D"http://python.org/psf/codeofconduct/" rel=3D"no=
referrer" target=3D"_blank">http://python.org/psf/codeofconduct/</a><br>
</blockquote></div></div>

--000000000000222d4905f3ce83c3--

--===============8553807973185196686==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline