[pypy-commit] pypy py3.6: fix test_constant_tuples: bytes were not considered constantifiable
cfbolz
pypy.commits at gmail.com
Wed Feb 27 10:54:00 EST 2019
Author: Carl Friedrich Bolz-Tereick <cfbolz at gmx.de>
Branch: py3.6
Changeset: r96188:2ff7e1e52fe2
Date: 2019-02-27 10:50 +0100
http://bitbucket.org/pypy/pypy/changeset/2ff7e1e52fe2/
Log: fix test_constant_tuples: bytes were not considered constantifiable
diff --git a/pypy/interpreter/astcompiler/optimize.py b/pypy/interpreter/astcompiler/optimize.py
--- a/pypy/interpreter/astcompiler/optimize.py
+++ b/pypy/interpreter/astcompiler/optimize.py
@@ -57,6 +57,12 @@
return self.s
+class __extend__(ast.Bytes):
+
+ def as_constant(self):
+ return self.s
+
+
class __extend__(ast.Ellipsis):
def as_constant_truth(self, space):
More information about the pypy-commit
mailing list