1.1 --- a/lib/builtins.py Tue Nov 28 00:37:12 2006 +0100
1.2 +++ b/lib/builtins.py Fri Dec 01 00:32:06 2006 +0100
1.3 @@ -98,6 +98,18 @@
1.4 else:
1.5 raise TypeError
1.6
1.7 + def __floordiv__(self, other):
1.8 + if isinstance(other, int):
1.9 + return int()
1.10 + else:
1.11 + raise TypeError
1.12 +
1.13 + def __rfloordiv__(self, other):
1.14 + if isinstance(other, int):
1.15 + return int()
1.16 + else:
1.17 + raise TypeError
1.18 +
1.19 def __pow__(self, other):
1.20 if isinstance(other, int):
1.21 return int()
1.22 @@ -362,6 +374,26 @@
1.23 else:
1.24 raise TypeError
1.25
1.26 + def __floordiv__(self, other):
1.27 + if isinstance(other, int):
1.28 + return float()
1.29 + elif isinstance(other, long):
1.30 + return float()
1.31 + elif isinstance(other, float):
1.32 + return float()
1.33 + else:
1.34 + raise TypeError
1.35 +
1.36 + def __rfloordiv__(self, other):
1.37 + if isinstance(other, int):
1.38 + return float()
1.39 + elif isinstance(other, long):
1.40 + return float()
1.41 + elif isinstance(other, float):
1.42 + return float()
1.43 + else:
1.44 + raise TypeError
1.45 +
1.46 def __pow__(self, other):
1.47 if isinstance(other, int):
1.48 return float()