Guido van Rossum wrote: > On Jan 25, 2008 10:01 AM, Leif Walsh <[EMAIL PROTECTED]> wrote: >> On Jan 25, 2008 12:37 PM, Christian Heimes <[EMAIL PROTECTED]> wrote: >>> The pipe char is ambiguous because is no direction. It was suggested and >>> rejected last year. >> Out of almost-pure devil's advocacy, has <> been considered? My first >> instinct is that it would be ambiguous with less-than/greater-than, >> but if someone can convince me otherwise, might it work? After all, >> it's the only other balanced pair of punctuation I see on my keyboard. > > No, there are too many syntactic situations where this would make the > grammar ambiguous or tortuous. We don't want to move beyond LL(1). > (Apart from parsing indentation and nested parentheses, of course -- > which actually reminds me or another issue with using <> as brackets: > the lexer can't know whether a particular < or > is used as a bracket > or not, so it can't keep track of nesting like it does for (), [] and > {}. So <> would always remain a second-class citizen.) >
Hmm, I guess both of those objections apply to using | as the delimiter as well. Ah well. If anyone has a bit of free time to play with, it will probably be worth creating a retrospective PEP for the set literal syntax to capture the rationale for the various design decisions like: - why not || or <> as the delimeters? - why {} continues as the empty dict - why {1, 2, 3} is immutable, while {1:2} is not Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --------------------------------------------------------------- http://www.boredomandlaziness.org _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com