1.1 --- a/lib/builtins.py Fri Aug 25 01:23:43 2006 +0200
1.2 +++ b/lib/builtins.py Sat Sep 02 23:43:46 2006 +0200
1.3 @@ -74,7 +74,7 @@
1.4 if isinstance(other, int):
1.5 return int()
1.6 else:
1.7 - TypeConstraintError
1.8 + raise TypeError
1.9
1.10 def __isub__(self, other):
1.11 """
1.12 @@ -84,7 +84,7 @@
1.13 if isinstance(other, int):
1.14 return int()
1.15 else:
1.16 - TypeConstraintError
1.17 + raise TypeError
1.18
1.19 def __add__(self, other):
1.20 """
1.21 @@ -94,7 +94,7 @@
1.22 if isinstance(other, int):
1.23 return int()
1.24 else:
1.25 - TypeConstraintError
1.26 + raise TypeError
1.27
1.28 def __radd__(self, other):
1.29 """
1.30 @@ -104,7 +104,7 @@
1.31 if isinstance(other, int):
1.32 return int()
1.33 else:
1.34 - TypeConstraintError
1.35 + raise TypeError
1.36
1.37 def __sub__(self, other):
1.38 """
1.39 @@ -114,7 +114,7 @@
1.40 if isinstance(other, int):
1.41 return int()
1.42 else:
1.43 - TypeConstraintError
1.44 + raise TypeError
1.45
1.46 def __rsub__(self, other):
1.47 """
1.48 @@ -124,7 +124,7 @@
1.49 if isinstance(other, int):
1.50 return int()
1.51 else:
1.52 - TypeConstraintError
1.53 + raise TypeError
1.54
1.55 def __mul__(self, other):
1.56 """
1.57 @@ -134,7 +134,7 @@
1.58 if isinstance(other, int):
1.59 return int()
1.60 else:
1.61 - TypeConstraintError
1.62 + raise TypeError
1.63
1.64 def __rmul__(self, other):
1.65 """
1.66 @@ -144,7 +144,7 @@
1.67 if isinstance(other, int):
1.68 return int()
1.69 else:
1.70 - TypeConstraintError
1.71 + raise TypeError
1.72
1.73 def __div__(self, other):
1.74 """
1.75 @@ -154,7 +154,7 @@
1.76 if isinstance(other, int):
1.77 return int()
1.78 else:
1.79 - TypeConstraintError
1.80 + raise TypeError
1.81
1.82 def __rdiv__(self, other):
1.83 """
1.84 @@ -164,7 +164,7 @@
1.85 if isinstance(other, int):
1.86 return int()
1.87 else:
1.88 - TypeConstraintError
1.89 + raise TypeError
1.90
1.91 def __pow__(self, other):
1.92 """
1.93 @@ -174,7 +174,7 @@
1.94 if isinstance(other, int):
1.95 return int()
1.96 else:
1.97 - TypeConstraintError
1.98 + raise TypeError
1.99
1.100 def __lt__(self, other):
1.101 """
1.102 @@ -184,7 +184,7 @@
1.103 if isinstance(other, int):
1.104 return boolean()
1.105 else:
1.106 - TypeConstraintError
1.107 + raise TypeError
1.108
1.109 def __gt__(self, other):
1.110 """
1.111 @@ -194,7 +194,7 @@
1.112 if isinstance(other, int):
1.113 return boolean()
1.114 else:
1.115 - TypeConstraintError
1.116 + raise TypeError
1.117
1.118 def __le__(self, other):
1.119 """
1.120 @@ -204,7 +204,7 @@
1.121 if isinstance(other, int):
1.122 return boolean()
1.123 else:
1.124 - TypeConstraintError
1.125 + raise TypeError
1.126
1.127 def __ge__(self, other):
1.128 """
1.129 @@ -214,7 +214,7 @@
1.130 if isinstance(other, int):
1.131 return boolean()
1.132 else:
1.133 - TypeConstraintError
1.134 + raise TypeError
1.135
1.136 def __eq__(self, other):
1.137 """
1.138 @@ -224,7 +224,7 @@
1.139 if isinstance(other, int):
1.140 return boolean()
1.141 else:
1.142 - TypeConstraintError
1.143 + raise TypeError
1.144
1.145 def __ne__(self, other):
1.146 """
1.147 @@ -234,7 +234,7 @@
1.148 if isinstance(other, int):
1.149 return boolean()
1.150 else:
1.151 - TypeConstraintError
1.152 + raise TypeError
1.153
1.154 def __neg__(self):
1.155 """
1.156 @@ -271,7 +271,7 @@
1.157 elif isinstance(other, long):
1.158 return long()
1.159 else:
1.160 - TypeConstraintError
1.161 + raise TypeError
1.162
1.163 def __isub__(self, other):
1.164 """
1.165 @@ -283,7 +283,7 @@
1.166 elif isinstance(other, long):
1.167 return long()
1.168 else:
1.169 - TypeConstraintError
1.170 + raise TypeError
1.171
1.172 def __add__(self, other):
1.173 """
1.174 @@ -295,7 +295,7 @@
1.175 elif isinstance(other, long):
1.176 return long()
1.177 else:
1.178 - TypeConstraintError
1.179 + raise TypeError
1.180
1.181 def __radd__(self, other):
1.182 """
1.183 @@ -307,7 +307,7 @@
1.184 elif isinstance(other, long):
1.185 return long()
1.186 else:
1.187 - TypeConstraintError
1.188 + raise TypeError
1.189
1.190 def __sub__(self, other):
1.191 """
1.192 @@ -319,7 +319,7 @@
1.193 elif isinstance(other, long):
1.194 return long()
1.195 else:
1.196 - TypeConstraintError
1.197 + raise TypeError
1.198
1.199 def __rsub__(self, other):
1.200 """
1.201 @@ -331,7 +331,7 @@
1.202 elif isinstance(other, long):
1.203 return long()
1.204 else:
1.205 - TypeConstraintError
1.206 + raise TypeError
1.207
1.208 def __lt__(self, other):
1.209 """
1.210 @@ -343,7 +343,7 @@
1.211 elif isinstance(other, long):
1.212 return boolean()
1.213 else:
1.214 - TypeConstraintError
1.215 + raise TypeError
1.216
1.217 def __gt__(self, other):
1.218 """
1.219 @@ -355,7 +355,7 @@
1.220 elif isinstance(other, long):
1.221 return boolean()
1.222 else:
1.223 - TypeConstraintError
1.224 + raise TypeError
1.225
1.226 def __le__(self, other):
1.227 """
1.228 @@ -367,7 +367,7 @@
1.229 elif isinstance(other, long):
1.230 return boolean()
1.231 else:
1.232 - TypeConstraintError
1.233 + raise TypeError
1.234
1.235 def __ge__(self, other):
1.236 """
1.237 @@ -379,7 +379,7 @@
1.238 elif isinstance(other, long):
1.239 return boolean()
1.240 else:
1.241 - TypeConstraintError
1.242 + raise TypeError
1.243
1.244 def __eq__(self, other):
1.245 """
1.246 @@ -391,7 +391,7 @@
1.247 elif isinstance(other, long):
1.248 return boolean()
1.249 else:
1.250 - TypeConstraintError
1.251 + raise TypeError
1.252
1.253 def __ne__(self, other):
1.254 """
1.255 @@ -403,7 +403,7 @@
1.256 elif isinstance(other, long):
1.257 return boolean()
1.258 else:
1.259 - TypeConstraintError
1.260 + raise TypeError
1.261
1.262 def __neg__(self):
1.263 """
1.264 @@ -442,7 +442,7 @@
1.265 elif isinstance(other, float):
1.266 return float()
1.267 else:
1.268 - TypeConstraintError
1.269 + raise TypeError
1.270
1.271 def __isub__(self, other):
1.272 """
1.273 @@ -456,7 +456,7 @@
1.274 elif isinstance(other, float):
1.275 return float()
1.276 else:
1.277 - TypeConstraintError
1.278 + raise TypeError
1.279
1.280 def __add__(self, other):
1.281 """
1.282 @@ -470,7 +470,7 @@
1.283 elif isinstance(other, float):
1.284 return float()
1.285 else:
1.286 - TypeConstraintError
1.287 + raise TypeError
1.288
1.289 def __radd__(self, other):
1.290 """
1.291 @@ -484,7 +484,7 @@
1.292 elif isinstance(other, float):
1.293 return float()
1.294 else:
1.295 - TypeConstraintError
1.296 + raise TypeError
1.297
1.298 def __sub__(self, other):
1.299 """
1.300 @@ -498,7 +498,7 @@
1.301 elif isinstance(other, float):
1.302 return float()
1.303 else:
1.304 - TypeConstraintError
1.305 + raise TypeError
1.306
1.307 def __rsub__(self, other):
1.308 """
1.309 @@ -512,7 +512,7 @@
1.310 elif isinstance(other, float):
1.311 return float()
1.312 else:
1.313 - TypeConstraintError
1.314 + raise TypeError
1.315
1.316 def __mul__(self, other):
1.317 """
1.318 @@ -526,7 +526,7 @@
1.319 elif isinstance(other, float):
1.320 return float()
1.321 else:
1.322 - TypeConstraintError
1.323 + raise TypeError
1.324
1.325 def __rmul__(self, other):
1.326 """
1.327 @@ -540,7 +540,7 @@
1.328 elif isinstance(other, float):
1.329 return float()
1.330 else:
1.331 - TypeConstraintError
1.332 + raise TypeError
1.333
1.334 def __div__(self, other):
1.335 """
1.336 @@ -554,7 +554,7 @@
1.337 elif isinstance(other, float):
1.338 return float()
1.339 else:
1.340 - TypeConstraintError
1.341 + raise TypeError
1.342
1.343 def __rdiv__(self, other):
1.344 """
1.345 @@ -568,7 +568,7 @@
1.346 elif isinstance(other, float):
1.347 return float()
1.348 else:
1.349 - TypeConstraintError
1.350 + raise TypeError
1.351
1.352 def __pow__(self, other):
1.353 """
1.354 @@ -582,7 +582,7 @@
1.355 elif isinstance(other, float):
1.356 return float()
1.357 else:
1.358 - TypeConstraintError
1.359 + raise TypeError
1.360
1.361 def __rpow__(self, other):
1.362 """
1.363 @@ -596,7 +596,7 @@
1.364 elif isinstance(other, float):
1.365 return float()
1.366 else:
1.367 - TypeConstraintError
1.368 + raise TypeError
1.369
1.370 def __lt__(self, other):
1.371 """
1.372 @@ -610,7 +610,7 @@
1.373 elif isinstance(other, float):
1.374 return boolean()
1.375 else:
1.376 - TypeConstraintError
1.377 + raise TypeError
1.378
1.379 def __gt__(self, other):
1.380 """
1.381 @@ -624,7 +624,7 @@
1.382 elif isinstance(other, float):
1.383 return boolean()
1.384 else:
1.385 - TypeConstraintError
1.386 + raise TypeError
1.387
1.388 def __le__(self, other):
1.389 """
1.390 @@ -638,7 +638,7 @@
1.391 elif isinstance(other, float):
1.392 return boolean()
1.393 else:
1.394 - TypeConstraintError
1.395 + raise TypeError
1.396
1.397 def __ge__(self, other):
1.398 """
1.399 @@ -652,7 +652,7 @@
1.400 elif isinstance(other, float):
1.401 return boolean()
1.402 else:
1.403 - TypeConstraintError
1.404 + raise TypeError
1.405
1.406 def __eq__(self, other):
1.407 """
1.408 @@ -666,7 +666,7 @@
1.409 elif isinstance(other, float):
1.410 return boolean()
1.411 else:
1.412 - TypeConstraintError
1.413 + raise TypeError
1.414
1.415 def __ne__(self, other):
1.416 """
1.417 @@ -680,7 +680,7 @@
1.418 elif isinstance(other, float):
1.419 return boolean()
1.420 else:
1.421 - TypeConstraintError
1.422 + raise TypeError
1.423
1.424 def __neg__(self):
1.425 """
1.426 @@ -715,7 +715,7 @@
1.427 if isinstance(other, string):
1.428 return string()
1.429 else:
1.430 - TypeConstraintError
1.431 + raise TypeError
1.432
1.433 def __radd__(self, other):
1.434 """
1.435 @@ -725,7 +725,7 @@
1.436 if isinstance(other, string):
1.437 return string()
1.438 else:
1.439 - TypeConstraintError
1.440 + raise TypeError
1.441
1.442 def __len__(self):
1.443 """
1.444 @@ -770,7 +770,7 @@
1.445 NATIVE
1.446 """
1.447 if not isinstance(size, int):
1.448 - TypeConstraintError
1.449 + raise TypeError
1.450
1.451 def append(self, s):
1.452 """
1.453 @@ -778,7 +778,7 @@
1.454 NATIVE
1.455 """
1.456 if not isinstance(s, string):
1.457 - TypeConstraintError
1.458 + raise TypeError
1.459 pass
1.460
1.461 def __str__(self):
1.462 @@ -897,7 +897,7 @@
1.463 self.l = next
1.464 return l.value
1.465 else:
1.466 - raise StopIteration() # NOTE: Make this compliant with Python!
1.467 + raise StopIteration
1.468
1.469 def __true__(self):
1.470 """
1.471 @@ -991,7 +991,7 @@
1.472 self.l = next
1.473 return l.value
1.474 else:
1.475 - raise StopIteration() # NOTE: Make this compliant with Python!
1.476 + raise StopIteration
1.477
1.478 def __true__(self):
1.479 """
1.480 @@ -1079,7 +1079,7 @@
1.481
1.482 def next(self):
1.483 if self.current >= self.end:
1.484 - raise StopIteration()
1.485 + raise StopIteration
1.486 current = self.current
1.487 self.current += self.step
1.488 return current