[Python-ideas] syntax for set

average dreamingforward at gmail.com
Tue Nov 16 04:16:40 CET 2010

The *only* glitch is the lack of an empty set notation. The idea of

> dict() == {:}; set()=={};
> which would be the obvious choice if starting fresh,
> was considered but rejected by Guido as too disruptive
> and introducing another barrier between Python 2 and 3.

I have to say that the *lack*of those two suggested literals are a sore
point for me (that along with the fact that dict doesn't inherit from set).
Call me a nit-picker, but (without them) they are like sand in the vast
gearbox of my mind when using python3: small but disruptive.  I would argue
that the lack of them is what is *preventing* the adoption of python3.  And
although I appreciate the kind reluctance to change the long-standing {} for
the empty dict, I hasten to mention that the universe will naturally
gravitate to that which is most elegant, so better to feel the pain at the
beginning than a long demise without them.  (I suspect there would even be a
small but measurable increase in downloads should python offer the option. )

Along those lines of simple ease-of-use issues, help() should have a verbose
option, so that doctests don't clutter up basic interface information.  And
I put another vote (from a discussion long ago) in favor of a test()
built-in to make test-driven development a core part of the language.  This
would be a quite novel and powerful step in front of any other known

Just some minor thoughts from nobody in particular  .... :)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20101115/3babeab7/attachment.html>

More information about the Python-ideas mailing list