aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRonan Lamy <ronan.lamy@gmail.com>2020-04-18 20:28:23 +0100
committerRonan Lamy <ronan.lamy@gmail.com>2020-04-18 20:28:23 +0100
commit6ef3ab34ae7749acbafa08c1690a9e0023ad2acb (patch)
treecccdc6b6da8fff5bad035a2d18562e5de7f32be5 /rpython/flowspace
parentadd jobs control, from issue 3187 (diff)
downloadpypy-6ef3ab34ae7749acbafa08c1690a9e0023ad2acb.tar.gz
pypy-6ef3ab34ae7749acbafa08c1690a9e0023ad2acb.tar.bz2
pypy-6ef3ab34ae7749acbafa08c1690a9e0023ad2acb.zip
Modernize exec syntax in rpython/
Diffstat (limited to 'rpython/flowspace')
-rw-r--r--rpython/flowspace/operation.py8
-rw-r--r--rpython/flowspace/test/test_objspace.py2
2 files changed, 5 insertions, 5 deletions
diff --git a/rpython/flowspace/operation.py b/rpython/flowspace/operation.py
index ab5b0074b1..af482bfae1 100644
--- a/rpython/flowspace/operation.py
+++ b/rpython/flowspace/operation.py
@@ -320,22 +320,22 @@ def inplace_mul(x, y):
x *= y
return x
-exec compile2("""
+exec(compile2("""
def inplace_truediv(x, y):
x /= y
return x
-""", flags=__future__.CO_FUTURE_DIVISION, dont_inherit=1)
+""", flags=__future__.CO_FUTURE_DIVISION, dont_inherit=1))
# makes an INPLACE_TRUE_DIVIDE
def inplace_floordiv(x, y):
x //= y
return x
-exec compile2("""
+exec(compile2("""
def inplace_div(x, y):
x /= y
return x
-""", flags=0, dont_inherit=1) # makes an INPLACE_DIVIDE
+""", flags=0, dont_inherit=1)) # makes an INPLACE_DIVIDE
def inplace_mod(x, y):
x %= y
diff --git a/rpython/flowspace/test/test_objspace.py b/rpython/flowspace/test/test_objspace.py
index 2e8c16b3d5..4c14999509 100644
--- a/rpython/flowspace/test/test_objspace.py
+++ b/rpython/flowspace/test/test_objspace.py
@@ -1156,7 +1156,7 @@ class TestFlowObjSpace(Base):
def f():
x = 5
return x
- exec "None"
+ exec("None")
graph = self.codetest(f)
assert len(graph.startblock.exits) == 1
assert graph.startblock.exits[0].target == graph.returnblock