Sorry, I really should have had my morning coffee before making that reply. Big-time thinko :)
What I meant to say is that the other comparable builtin types (comma-delimited containers of some description) that have literals built into the language (list, tuple, dict) also have a literal that represents an empty version of themselves, except for set. It's not really much of an argument, but I figured I'd mention it. On Fri, Apr 9, 2021 at 1:23 PM Serhiy Storchaka <[email protected]> wrote: > 09.04.21 12:50, Matt del Valle пише: > > I think sets are the only type in the builtins module > > without a dedicated literal syntax? > > Not only. bytearray, frozenset, slice. It is difficult to create some > complex objects without using constructor. Not counting range, > memoryview and dict views, descriptors (staticmethod, classmethod, > property), exceptions, iterators (filter, map, zip, enumerate, reversed > and numerous collection iterators). All these types are defined in the > builtins module. > > _______________________________________________ > 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/LS43IAFFLNCCVVLF6WXMXOYZFOSNOHRL/ > Code of Conduct: http://python.org/psf/codeofconduct/ >
_______________________________________________ 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/Y6UJDJYIL374UQHOGCTTIHGOI4SJRZMO/ Code of Conduct: http://python.org/psf/codeofconduct/
