On 4/26/06, Talin <[EMAIL PROTECTED]> wrote:
> A set with a single element is:
>
> {1,}
>
> In other words, we steal the idea from tuples - a trailing comma is used as a
> way to signal that this is a comma-separated list of one item.
There's no need for this; there's no ambiguity. The ambiguity only
starts for empty sets (unlike for tuples).
> A set with no elements is:
>
> set()
If we don't come up with something better I can live with this.
> Alternatively, you could take the tuple idea one step further:
>
> {,}
>
> However, I'm not sure I like this very much.
I'm sure I don't.
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com