Py3K idea: why not drop the colon?

Neil Cerutti horpner at yahoo.com
Fri Nov 10 11:49:18 EST 2006


On 2006-11-10, Bjoern Schliessmann <usenet-mail-0306.20.chr0n0ss at spamgourmet.com> wrote:
> Neil Cerutti wrote:
>> On 2006-11-09, Bjoern Schliessmann
>
>>> if color == red or blue or green:
>>>     return 'primary'
>>>
>>>:)
>  
>> The Inform 6* programming language supports the serial 'or' (and
>> 'and') and looks just like that.
>
> Python also supports it.
>
>> The disadvantage is that the usual binary logical operators
>> must exist and are spelled differently. (It uses C's '||' and
>> '&&'.)
>
> Do they have to be spelled differently? In Python, they don't
> have to.

That kind of answers your question. ;-)

That is cool. I was unaware of the feature; until just now I
thought Inform was had innovated the syntax!

-- 
Neil Cerutti



More information about the Python-list mailing list