not in
borcis
borcis at geneva-link.ch
Mon Jan 21 08:01:58 EST 2002
rihad wrote:
>
> Why does python introduce new syntax with `x not in s'? Isn't it the
> same as `not (x in s)'? Same for `is not'.
Guess you need to appreciate the charm as a mimick
of English grammar of "x not in s" or "o is not p",
consistent with python's look as "executable pseudocode".
For instance it allows the one-liner python solution
to the Turing test (which I guess I need to announce
a bit more widely) :
filter(lambda W : W not in "ILLITERATE","BULLSHIT")
This program clearly demonstrates python's aptitude
to close ranks just as any intelligent american
citizen.
BB
More information about the Python-list
mailing list