Skip to content

Commit 0a241eb

Browse files
committed
[GR-20762] Make parrot-b2 benchmark python 3.7 compatible
PullRequest: graalpython/791
2 parents 6d18391 + 520fda6 commit 0a241eb

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
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):

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/generator/GeneratorBuiltins.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2017, 2019, Oracle and/or its affiliates.
2+
* Copyright (c) 2017, 2020, Oracle and/or its affiliates.
33
* Copyright (c) 2014, Regents of the University of California
44
*
55
* All rights reserved.

0 commit comments

Comments
 (0)