El vie, 3 feb 2023 a las 8:01, Stéfane Fermigier (<sf@fermigier.com>) escribió:
"


On Fri, Feb 3, 2023 at 12:28 PM Stephen J. Turnbull <stephenjturnbull@gmail.com> wrote:
Stéfane 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 '∅' is not valid in identifiers, but I'm
curious about these other "several reasons".

IIRC (this was a few years back):  '∅' (aka EMPTY SET) was not accepted by Python, so I used instead ''Ø" (aka "LATIN CAPITAL LETTER O WITH STROKE").

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 Łukasz 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 Software (CNLL) - http://cnll.fr/
Co-Founder & Chairman, Association Professionnelle Européenne du Logiciel 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 -- python-dev@python.org
To unsubscribe send an email to python-dev-leave@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/H2UALG4YAA6IBMZQMWEL2QIOPDPK4RTG/
Code of Conduct: http://python.org/psf/codeofconduct/