On 5/3/06, Greg Wilson <[EMAIL PROTECTED]> wrote:
>     Type    Two elements        One element        Empty
>     List    [1, 2]              [1]                []
>     Dict    {1:'a', 2:'b'}      {1:'a'}            {}
>     Set     {1, 2}              {1}                set()

You left off Tuple, perhaps because it also broke the simple pattern:
      Tuple   1, 2                (1,)               ()

Still I see no reason to repeat the confusion to save one pair of
braces (square or parenthetical). Starting the language over I could
see making {:} and {} the empty dict and set respectively, but not
with the history Python has.

If people are dead set on a set literal, why not look further, to
atrocities like <1,2>, <1>, <>; @{1,2}, @{1}, @{}; {{1,2}}, {{1}},
{{}}; etc.? I know there has been resistance to grouped <> before (not
for sets), but I can't remember why.

Michael
--
Michael Urman  http://www.tortall.net/mu/blog
_______________________________________________
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

Reply via email to