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
On Jan 17, 2008 3:15 AM, Mark Summerfield <mark@qtrac.eu> wrote:
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}
?
This was discussed when set literals were added. It was decided that it would be too much of a backwards incompatibility even for Python 3.0. It may be worth re-considering for Python 4.0. ;-) Steve -- I'm not *in*-sane. Indeed, I am so far *out* of sane that you appear a tiny blip on the distant coast of sanity. --- Bucky Katt, Get Fuzzy
On Jan 17, 2008 1:10 PM, Steven Bethard <steven.bethard@gmail.com> wrote:
On Jan 17, 2008 3:15 AM, Mark Summerfield <mark@qtrac.eu> wrote:
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}
?
This was discussed when set literals were added. It was decided that it would be too much of a backwards incompatibility even for Python 3.0. It may be worth re-considering for Python 4.0. ;-)
How about {/} for empty sets ? (although chances are that this or something similar has been discussed and rejected too :)). George
Right. All possible proposals have already been discussed at length. Really, writing set() isn't so bad. Get used to it. On Jan 17, 2008 10:23 AM, George Sakkis <george.sakkis@gmail.com> wrote:
On Jan 17, 2008 1:10 PM, Steven Bethard <steven.bethard@gmail.com> wrote:
On Jan 17, 2008 3:15 AM, Mark Summerfield <mark@qtrac.eu> wrote:
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}
?
This was discussed when set literals were added. It was decided that it would be too much of a backwards incompatibility even for Python 3.0. It may be worth re-considering for Python 4.0. ;-)
How about {/} for empty sets ? (although chances are that this or something similar has been discussed and rejected too :)).
George
_______________________________________________ Python-ideas mailing list Python-ideas@python.org http://mail.python.org/mailman/listinfo/python-ideas
-- --Guido van Rossum (home page: http://www.python.org/~guido/)
George Sakkis schrieb:
On Jan 17, 2008 1:10 PM, Steven Bethard <steven.bethard@gmail.com> wrote:
On Jan 17, 2008 3:15 AM, Mark Summerfield <mark@qtrac.eu> wrote:
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}
?
This was discussed when set literals were added. It was decided that it would be too much of a backwards incompatibility even for Python 3.0. It may be worth re-considering for Python 4.0. ;-)
How about {/} for empty sets ? (although chances are that this or something similar has been discussed and rejected too :)).
It has been discussed and rejected. :) Georg
participants (6)
-
Georg Brandl -
George Sakkis -
Gregory P. Smith -
Guido van Rossum -
Mark Summerfield -
Steven Bethard