Paul Boddie wrote: > Michael Hobbs wrote: > >> I think the colon could be omitted from every type of compound >> statement: 'if', 'for', 'def', 'class', whatever. Am I missing anything? >> > > The FAQ answer. ;-) > > http://www.python.org/doc/faq/general/#why-are-colons-required-for-the-if-while-def-class-statements > > Paul > I knew there was a document somewhere that I missed. ;-) I even scanned all the Py3K PEPs before posting. Anyway, the FAQ answer seems to be a weak argument to me. But if the BDFL insists that it remains, why not take the converse approach? That is, assume that the expression ends at the colon, not at the newline. That would make this type of statement possible: if color == red or color == blue or color == green: return 'primary' Right now, such a statement would have to be spelled thus: if color == red or \ color == blue or \ color == green: return 'primary' or if (color == red or color == blue or color == green): return 'primary' -- http://mail.python.org/mailman/listinfo/python-list
- Re: How to choose the right GUI toolkit ? Bill Maxwell
- Re: How to choose the right GUI toolkit ? John Henry
- Re: How to choose the right GUI toolkit ? John Henry
- Re: How to choose the right GUI toolkit ? Nick Craig-Wood
- Re: How to choose the right GUI toolkit ? Christophe
- Re: How to choose the right GUI toolkit ? Nick Craig-Wood
- Py3K idea: why not drop the colon? Michael Hobbs
- Re: Py3K idea: why not drop the colon? Ben Finney
- Re: Py3K idea: why not drop the colon? Dan Lenski
- Re: Py3K idea: why not drop the colon? Paul Boddie
- Re: Py3K idea: why not drop the colon? Michael Hobbs
- Re: Py3K idea: why not drop the colon? Steve Holden
- Re: Py3K idea: why not drop the colon? Paul Boddie
- Re: Py3K idea: why not drop the co... Steve Holden
- Re: [OT] Py3K idea: why not drop t... [EMAIL PROTECTED]
- Re: Py3K idea: why not drop the colon? Daniel Dittmar
- Re: Py3K idea: why not drop the colon? John Salerno
- Re: Py3K idea: why not drop the co... Neil Cerutti
- Re: Py3K idea: why not drop the co... Tim Chase
- Re: Py3K idea: why not drop the co... Robert Kern
- Re: Py3K idea: why not drop the co... Neil Cerutti