1.1 --- a/lib/operator/binary.py Tue Nov 29 16:43:58 2016 +0100
1.2 +++ b/lib/operator/binary.py Tue Nov 29 17:25:54 2016 +0100
1.3 @@ -25,9 +25,6 @@
1.4 # lambda functions. Thus, the appropriate methods are defined locally, but no
1.5 # attempt to obtain them is made until the generic function is called.
1.6
1.7 -# NOTE: The compiler should make it possible for the following functions to call
1.8 -# NOTE: the generic operator implementations with no additional call overhead.
1.9 -
1.10 # Binary operator functions.
1.11
1.12 def add(a, b):
1.13 @@ -46,10 +43,10 @@
1.14 return binary_op(a, b, lambda a: a.__floordiv__, lambda b: b.__rfloordiv__)
1.15
1.16 def in_(a, b):
1.17 - return a.__contains__(b)
1.18 + return b.__contains__(a)
1.19
1.20 def not_in(a, b):
1.21 - return not a.__contains__(b)
1.22 + return not b.__contains__(a)
1.23
1.24 def lshift(a, b):
1.25 return binary_op(a, b, lambda a: a.__lshift__, lambda b: b.__rlshift__)