not in

Aahz Maruch aahz at panix.com
Mon Jan 21 20:03:10 EST 2002


In article <mailman.1011642570.7243.python-list at python.org>,
Michael Chermside  <mcherm at destiny.com> wrote:
>
>rihad is just asking why the Python grammer has this special case for 
>"not in" (and another for "is not").
>
>rihad, the answer is quite simple. Because it matches word order in a 
>normal English sentence. You wouldn't ALWAYS want to match the word 
>order / meaning of a natural language (they sometimes have badly flawed 
>logic -- consider "not not" in Spanish for instance), but there are some 
>cases where matching the natural language aids in comprehensibility and 
>writability.
>
>For some reason Guido decided that this was one of those cases. I 
>probably wouldn't have made the same decision, but you know what? After 
>using it a bit, I've decided that he was probably right. Your mileage 
>may vary.

And *that* is why Python is such a wonderful language.  Nine times out
of ten (or even more), people who disagree with Guido about a design
issue turn to agreement after extended use of an idiom.  Guido sometimes
fails at *explaining* his design choices, but his design instincts have
proven over time to be better than almost anyone else in the business.
-- 
                      --- Aahz  <*>  (Copyright 2002 by aahz at pobox.com)

Hugs and backrubs -- I break Rule 6                 http://www.rahul.net/aahz/
Androgynous poly kinky vanilla queer het Pythonista   

"I support family values -- Addams family values" --www.nancybuttons.com



More information about the Python-list mailing list