![]() |
RE: Set literals
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 share the same delimiter ? This was the proposed syntax (with {-} being the empty set - there's the ambiguity). The issue may be revisited for Python 3K, but for now there will not be syntax support for sets. Read the section on 'Set Notation' in: http://www.python.org/peps/pep-0218.html Tim Delaney |
Re: Set literals
"Delaney, Timothy C (Timothy)" <tdelaney@avaya.com> 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 share the same delimiter ? > > This was the proposed syntax (with {-} being the empty set - there's the > ambiguity). The issue may be revisited for Python 3K, but for now there > will not be syntax support for sets. > > Read the section on 'Set Notation' in: > http://www.python.org/peps/pep-0218.html > > Tim Delaney Thanks for the link; obviously, I wasn't aware of the proposal and its rejection. looking-forward-to-python-3K-ly yours, George |
| All times are GMT. The time now is 01:52 PM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.