Usefulness of the "not in" operator

Chris Angelico rosuav at gmail.com
Sat Oct 8 21:29:45 EDT 2011


I sent this email twelve hours ago but to the wrong mailing list
*blush*. Since nobody else has raised the point, I'll repost it.

On Sun, Oct 9, 2011 at 12:07 AM, Jussi Piitulainen
<jpiitula at ling.helsinki.fi> wrote:
> But both negations can be avoided by modus tollens.
>
> "If you are able to start the car, the key is in the ignition."
>

But this translation implies looking at the result and ascertaining
the state, which is less appropriate to a programming language. It's
more like:

"If you found that you were able to start the car, the key must have
been in the ignition."

and is thus quite inappropriate to the imperative style. A functional
language MAY be able to use this style, but Python wants to have the
condition and then the action.

ChrisA



More information about the Python-list mailing list