interpreter: use zip function
Currently this is implemented as range(min(len(a), len(b)), an then
indexing into a and b to get what we actually want. Fortunately python
provides a function called zip that just does this.
@@ -2278,9 +2278,7 @@ external dependencies (including libraries) must go to "dependencies".''')
if argcount != len(args):
raise InvalidArguments('Expected %d arguments, got %d.' %
(argcount, len(args)))
- for i in range(min(len(args), len(arg_types))):
- wanted = arg_types[i]
- actual = args[i]
+ for actual, wanted in zip(args, arg_types):
if wanted is not None:
if not isinstance(actual, wanted):
raise InvalidArguments('Incorrect argument type.')
