not in

Alex Martelli aleax at aleax.it
Mon Jan 21 15:05:57 CET 2002


"rihad" <rihad at mail.ru> wrote in message
news:3m4o4u8tnumteu12vtd8solunp2ai7kjvo at 4ax.com...
> Why does python introduce new syntax with `x not in s'? Isn't it the

What do you mean "new"?  Operator "not in" has been around for ages
(as has operator "is not").

> same as `not (x in s)'? Same for `is not'.

Yes, the semantics are intended to be basically the same, just as
the semantics of "not a and not b" had better be basically the same
as those of "not (a or b)".  So what?  Would you can "not a and not b"
``new syntax''?  I suspect I'm missing your point -- what IS it?


Alex






More information about the Python-list mailing list