Author: Ronan Lamy <[email protected]>
Branch: __debug__-optimize
Changeset: r97079:e6ebcd68aa27
Date: 2019-08-06 16:32 +0100
http://bitbucket.org/pypy/pypy/changeset/e6ebcd68aa27/

Log:    fix Ellipsis.as_constant()

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
@@ -64,9 +64,8 @@
 
 
 class __extend__(ast.Ellipsis):
-
-    def as_constant_truth(self, space, compile_info):
-        return True
+    def as_constant(self, space, compile_info):
+        return space.w_Ellipsis
 
 
 class __extend__(ast.Constant):
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to