On Fri, Apr 9, 2021 at 3:20 AM Serhiy Storchaka <[email protected]> wrote:
> 08.04.21 19:58, [email protected] пише: > > I would like to propose adding literal syntax to allow creation of an > empty set without the need to call the type constructor. I believe the best > choice for such a literal, and one that has been proposed before, is `{,}`. > > You can now use `{*()}` as a syntax for empty set. > Interestingly, Raymond Hettinger recently had a post on twitter specifically deriding this usage as obfuscatory, and expressing his preference that people not do it (and use set() instead). https://twitter.com/raymondh/status/1372376414184296448 I tend to agree with him on that... I have no opinion on whether set should be given its own "empty repr literal", but I don't think {*()} is a useful suggestion to give people who want one. --- Ricky. "I've never met a Kentucky man who wasn't either thinking about going home or actually going home." - Happy Chandler
_______________________________________________ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/5MVX7DYTMYRGZNTAFAW4DQXQH4YLZHTO/ Code of Conduct: http://python.org/psf/codeofconduct/
