Skip to content

Commit 791dfcd

Browse files
committed
Make parrot-b2 benchmark python 3.7 compatible
1 parent 6d18391 commit 791dfcd

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

graalpython/benchmarks/src/meso/parrot-b2.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python
22
# Copyright 2008-2010 Isaac Gouy
33
# Copyright (c) 2013, 2014, Regents of the University of California
4-
# Copyright (c) 2017, 2018, Oracle and/or its affiliates.
4+
# Copyright (c) 2017, 2020, Oracle and/or its affiliates.
55
# All rights reserved.
66
#
77
# Revised BSD license
@@ -91,7 +91,10 @@ def main(num):
9191
def _zip(a, b):
9292
iter_a = iter(a)
9393
for elem in b:
94-
yield next(iter_a), elem
94+
try:
95+
yield next(iter_a), elem
96+
except StopIteration:
97+
return
9598

9699

97100
def measure(num):

0 commit comments

Comments
 (0)