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. >
Yes. And yes, even if the idea wasn't rejected, the parser wouldn't be able to handle it. The same goes for |, too. The syntax would be ambiguous, and Python's parser would not be able to ever 'close' a set, because the closing character would be eaten by the expression inside the set. set([1, 2, 1|2]) -> |1, 2, 1|2| set([1>0, 2, 3]) -> <1>0, 2, 3> For some situations, a more clever parser would be able to figure it out, but there would still be purely ambiguous cases. And Guido has repeatedly stated he wants Python to remain parseable by a simple parser, even if we were to make CPython's parser more powerful. Weirder balanced-pairs have also been suggested, and rejected (both because they don't improve the readability and parsing situation, and because they just look absurd :) -- Thomas Wouters <[EMAIL PROTECTED]> Hi! I'm a .signature virus! copy me into your .signature file to help me spread!
_______________________________________________ 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