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

2008-01-26 Thread Guido van Rossum
On Jan 25, 2008 10:50 PM, Terry Reedy <[EMAIL PROTECTED]> wrote:
> "Jameson "Chema" Quinn" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> | 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/)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


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

2008-01-25 Thread Terry Reedy

"Jameson "Chema" Quinn" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
| 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'.

| 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.

-1

tjr



___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


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

2008-01-25 Thread Steve Holden
Guido van Rossum wrote:
> On Jan 25, 2008 8:13 AM, Jameson Chema Quinn <[EMAIL PROTECTED]> wrote:
>> 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".
>>
>> 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.
> 
> Sorry, but this use case just doesn't sound strong enough to change a
> programming language's grammar.
> 
> While I promise you I will remain -1 on the proposal simply because it
> doesn't serve any programmer's goals, you've piqued my curiosity --
> can you give an example of what your tool does? From your description
> I actually have no clue.
> 
It not does sound like a very good idea to me.

regards
  Steve
-- 
Steve Holden+1 571 484 6266   +1 800 494 3119
Holden Web LLC  http://www.holdenweb.com/

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


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

2008-01-25 Thread Collin Winter
On Jan 25, 2008 8:13 AM, Jameson Chema Quinn <[EMAIL PROTECTED]> wrote:
> 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".
>
> 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.

"not is" makes no sense to -- and is not easily parsed by -- my
English-native mind.

Collin Winter
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


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

2008-01-25 Thread Guido van Rossum
On Jan 25, 2008 8:13 AM, Jameson Chema Quinn <[EMAIL PROTECTED]> wrote:
> 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".
>
> 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.

Sorry, but this use case just doesn't sound strong enough to change a
programming language's grammar.

While I promise you I will remain -1 on the proposal simply because it
doesn't serve any programmer's goals, you've piqued my curiosity --
can you give an example of what your tool does? From your description
I actually have no clue.

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


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

2008-01-25 Thread Nick Coghlan
Jameson "Chema" Quinn wrote:
> 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".

Your editor is going to have to deal with code written the normal way 
anyway - given that this is a pretty special case, the special handling 
should stay in the tool that needs it (your editor) not in the 
programming language.

As you say, Python is heavily influenced by English, and in English "a 
not is b" is out-and-out nonsense (there is no way to build a coherent 
parse tree with that word order), while "not a is b" and "a is not b" 
both make sense (although you are correct in pointing out that the 
latter is technically ambiguous as an English phrase).

"is not" and "not in" are just normal binary operators that happen to 
consist of two words in the concrete syntax - your editor is going to 
need to be able to deal with that (even if that means having to handle 
translations that span multiple words).

Cheers,
Nick.

-- 
Nick Coghlan   |   [EMAIL PROTECTED]   |   Brisbane, Australia
---
 http://www.boredomandlaziness.org
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


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

2008-01-25 Thread Steven Bethard
On Jan 25, 2008 9:13 AM, Jameson Chema Quinn <[EMAIL PROTECTED]> wrote:
> 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".

-1.  There should be one obvious way to do it.  And honestly, if
you're dealing with natural language, and your system is not able to
change word order words between languages, you're in a lot of trouble
already.

STeVe
-- 
I'm not *in*-sane. Indeed, I am so far *out* of sane that you appear a
tiny blip on the distant coast of sanity.
--- Bucky Katt, Get Fuzzy
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


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

2008-01-25 Thread Jameson "Chema" Quinn
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".

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.
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com