Author: Carl Friedrich Bolz-Tereick <[email protected]>
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):
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit