"Neville Grech" <[EMAIL PROTECTED]> wrote:
> This is just some syntax sugar:
>
> Since set literals will change to for example {1,2,3} from set([1,2,3])
> and set comprehensions will be specified inside {} I feel that {}
> will be more naturally associated with sets than dicts (or at least
> as much).
>
> What if the empty set literal is changed to {} and an empty dict
> literal changed to {:}. Performing the conversion automatically
> wouldn't be so complex and also un-ambiguous. The hardest thing to
> change would be the mentality then.
Because the mentality would be so difficult to change, and because sets
are still used less frequently than dicts, it doesn't make sense to
alter dictionary syntax (that people have used for over a decade) for
sets (which don't yet have a literal syntax in a released Python).
Your heart is in the right place, but your logic is jumping the gun by
a while. Offer the suggestion after the syntax has been available in a
released Python for at least a year, when everyone has a chance to use
set syntax.
- Josiah
_______________________________________________
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