Usefulness of the "not in" operator
candide
candide at free.invalid
Sat Oct 8 10:41:43 EDT 2011
Le 08/10/2011 12:50, Jon Clements a écrit :
> 10 - 5 as 10 + -5 (as obviously the - is redundant as an operation),
> and 10 / 2 as int(10 * .5) or something, who needs a divide!?
OK, I see your point but I was supposing non-membershipness seldom
needed and in fact one can suppose that test membership is heavily more
used than test non-membership.
In fact, it seems that most Python operators have an "antonym" operator,
for instance :
== vs !=
< vs >=
is vs is not
+ vs -
etc
More information about the Python-list
mailing list