Re: Set literals

2005-03-21 Thread George Sakkis
[EMAIL PROTECTED]> wrote: > +1 from me. > > The other possible meaning for {1,2,3} would be {1:None,2:None,3:None}, > but that is usually meant to be a set anyway (done with a dict). > > So what is this: {1:2, 3, 4 } (apart from "nearly useless") ? Syntax error; you'll have to decide whether you

Re: Set literals

2005-03-21 Thread George Sakkis
"Delaney, Timothy C (Timothy)" <[EMAIL PROTECTED]> wrote: > > How about overloading curly braces for set literals, as in > > > aSet = {1,2,3} > > > > - It is the standard mathematic set notation. > > - There is no ambiguity or backwards compatibility problem. > > - Sets and dicts are in many

Re: Set literals

2005-03-21 Thread simon
+1 from me. The other possible meaning for {1,2,3} would be {1:None,2:None,3:None}, but that is usually meant to be a set anyway (done with a dict). So what is this: {1:2, 3, 4 } (apart from "nearly useless") ? hmmm, thinking a bit more about this, it seems you can build a set from a dict's keys

RE: Set literals

2005-03-21 Thread Delaney, Timothy C (Timothy)
George Sakkis wrote: > How about overloading curly braces for set literals, as in > aSet = {1,2,3} > > - It is the standard mathematic set notation. > - There is no ambiguity or backwards compatibility problem. > - Sets and dicts are in many respects similar data structures, so why > not sh

Re: Set literals

2005-03-21 Thread George Sakkis
> - There is no ambiguity or backwards compatibility problem. ...at least if it wasn't for the empty set.. hmm... -- http://mail.python.org/mailman/listinfo/python-list