builtin set literal

Hendrik van Rooyen mail at microcorp.co.za
Sat Feb 17 04:09:56 EST 2007


 "Schüle Daniel" <uval at rz.uni-karlsruhe.de> wrote:


>
> > {:} for empty dict and {} for empty set don't look too much atrocious
> > to me.
>
> this looks consistent to me

I disagree. What would be consistent would be to follow the pattern,
and use a different set of delimiters.

Python uses () for tuples, [] for lists, {} for dictionaries.
To be consistent, sets need something else, so you can see at a
glance what you are dealing with.

About all that is left is <>, ugly as it is.

The other way is the start of the slippery slide into alphabet soup.

- Hendrik




More information about the Python-list mailing list