[Python-Dev] Simple syntax proposal: "not is"

Guido van Rossum guido at python.org
Sat Jan 26 18:42:55 CET 2008


On Jan 25, 2008 10:50 PM, Terry Reedy <tjreedy at udel.edu> wrote:
> "Jameson "Chema" Quinn" <jquinn at cs.oberlin.edu> wrote in message
> news:faf2c12b0801250813n5b0b38eepe71944b6016224db at mail.gmail.com...
> | I'm writing a source code editor that translates identifiers and keywords
> | on-screen into a different natural language. This tool will do no
> | transformations except at the reversible word level. There is one simple,
> | avoidable case where this results in nonsense in many languages: "is
> not". I
> | propose allowing "not is" as an acceptable alternative to "is not".
>
> I an rather sure that the tokenizer outputs "is not" as a single token.
> Otherwise 'a is not b' would likely be parsed as 'a is (not b)', which is
> something quit different.  So your translater should recognize it as such
> also and output, for instance (en Espanol), 'no es'.

Sorry to burst your bubble, but 'is' and 'not' are two separate
tokens; the grammar handles this by giving unary 'not' a priority
lower than comparison operators.

> | Obviously English syntax has a deep influence on python syntax, and I
> would
> | never propose deeper syntactical changes for
> natural-language-compatibility.
> | This is a trivial change, one that is still easily parseable by an
> | English-native mind (and IMO actually makes more sense logically, since
> it
> | does not invite confusion with the nonsensical "is (not ...)"). The
> | use-cases where you have to grep for "is not" are few, and the "(is
> | not)|(not is)" pattern that would replace it is still pretty simple.
>
> 'a not is b' is much worse in English than I believe 'a es no b' in
> Espanol.

This proposal not is going to happen...

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-Dev mailing list