1.1 --- a/lib/builtins.py Fri Feb 23 00:12:44 2007 +0100
1.2 +++ b/lib/builtins.py Fri Feb 23 01:29:50 2007 +0100
1.3 @@ -373,6 +373,42 @@
1.4 else:
1.5 raise TypeError
1.6
1.7 + def __and__(self, other):
1.8 + if isinstance(other, int):
1.9 + return int()
1.10 + else:
1.11 + raise TypeError
1.12 +
1.13 + def __rand__(self, other):
1.14 + if isinstance(other, int):
1.15 + return int()
1.16 + else:
1.17 + raise TypeError
1.18 +
1.19 + def __or__(self, other):
1.20 + if isinstance(other, int):
1.21 + return int()
1.22 + else:
1.23 + raise TypeError
1.24 +
1.25 + def __ror__(self, other):
1.26 + if isinstance(other, int):
1.27 + return int()
1.28 + else:
1.29 + raise TypeError
1.30 +
1.31 + def __xor__(self, other):
1.32 + if isinstance(other, int):
1.33 + return int()
1.34 + else:
1.35 + raise TypeError
1.36 +
1.37 + def __rxor__(self, other):
1.38 + if isinstance(other, int):
1.39 + return int()
1.40 + else:
1.41 + raise TypeError
1.42 +
1.43 def __lt__(self, other):
1.44 if isinstance(other, int):
1.45 return bool()
1.46 @@ -542,6 +578,54 @@
1.47 else:
1.48 raise TypeError
1.49
1.50 + def __and__(self, other):
1.51 + if isinstance(other, int):
1.52 + return long()
1.53 + elif isinstance(other, long):
1.54 + return long()
1.55 + else:
1.56 + raise TypeError
1.57 +
1.58 + def __rand__(self, other):
1.59 + if isinstance(other, int):
1.60 + return long()
1.61 + elif isinstance(other, long):
1.62 + return long()
1.63 + else:
1.64 + raise TypeError
1.65 +
1.66 + def __or__(self, other):
1.67 + if isinstance(other, int):
1.68 + return long()
1.69 + elif isinstance(other, long):
1.70 + return long()
1.71 + else:
1.72 + raise TypeError
1.73 +
1.74 + def __ror__(self, other):
1.75 + if isinstance(other, int):
1.76 + return long()
1.77 + elif isinstance(other, long):
1.78 + return long()
1.79 + else:
1.80 + raise TypeError
1.81 +
1.82 + def __xor__(self, other):
1.83 + if isinstance(other, int):
1.84 + return long()
1.85 + elif isinstance(other, long):
1.86 + return long()
1.87 + else:
1.88 + raise TypeError
1.89 +
1.90 + def __rxor__(self, other):
1.91 + if isinstance(other, int):
1.92 + return long()
1.93 + elif isinstance(other, long):
1.94 + return long()
1.95 + else:
1.96 + raise TypeError
1.97 +
1.98 def __lt__(self, other):
1.99 if isinstance(other, int):
1.100 return bool()