[Python-ideas] Empty set {} and empty dict {:} ?

Mark Summerfield mark at qtrac.eu
Thu Jan 17 11:15:32 CET 2008


I just wondered if changing the empty set & dict syntax might be
possible.

    s = {}  # empty set
    d = {:} # empty dict

I think this would be more understandable to newcomers since to create
single element ones we have:

    s = {1}
    d = {1:1}

?

-- 
Mark Summerfield, Qtrac Ltd., www.qtrac.eu




More information about the Python-ideas mailing list