I'm -0 on the proposal; it might make the syntax more streamlined, but
I don't see a practical benefit. The current distinction between
different types of brackets works very well. I absolutely don't see
how it'd be worth to throw away dict literals just to buy set literals
(the natural spelling would be set(1,2,3) with this change, anyway).
On 7/8/06, Georg Brandl <[EMAIL PROTECTED]> wrote:
> How would you spell {1: 2} with your syntax?
I'd just create dicts from lists of tuples. Unfortunately
dict((1,'a'), (2,'b'), (3,'c')) is an extremely clumsy syntax, but an
alternative might be to change the role of ; to become a sequence
separator with lower precedence than a comma. Then you could write
dict(1,'a'; 2,'b'; 3,'c'). (And use the more Matlab-like syntax [1,2,3
; 4,5,6 ; 7,8,9] to create a matrix.) I'm not advocating this change
to this language, just providing a possible answer to the question.
Fredrik
_______________________________________________
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