Author: Philip Jenvey <pjen...@underboss.org>
Branch: py3.3
Changeset: r72549:e6da813670d7
Date: 2014-07-26 14:40 -0700
http://bitbucket.org/pypy/pypy/changeset/e6da813670d7/

Log:    fix function identifier clashing breaking translation

diff --git a/pypy/interpreter/special.py b/pypy/interpreter/special.py
--- a/pypy/interpreter/special.py
+++ b/pypy/interpreter/special.py
@@ -2,10 +2,20 @@
 
 
 class Ellipsis(W_Root):
+
+    @staticmethod
+    def descr_new_ellipsis(space, w_type):
+        return space.w_Ellipsis
+
     def descr__repr__(self, space):
         return space.wrap('Ellipsis')
 
 
 class NotImplemented(W_Root):
+
+    @staticmethod
+    def descr_new_notimplemented(space, w_type):
+        return space.w_NotImplemented
+
     def descr__repr__(self, space):
         return space.wrap('NotImplemented')
diff --git a/pypy/interpreter/typedef.py b/pypy/interpreter/typedef.py
--- a/pypy/interpreter/typedef.py
+++ b/pypy/interpreter/typedef.py
@@ -950,13 +950,13 @@
 Cell.typedef.acceptable_as_base_class = False
 
 Ellipsis.typedef = TypeDef("Ellipsis",
-    __new__ = interp2app(lambda space, w_type: space.w_Ellipsis),
+    __new__ = interp2app(Ellipsis.descr_new_ellipsis),
     __repr__ = interp2app(Ellipsis.descr__repr__),
 )
 Ellipsis.typedef.acceptable_as_base_class = False
 
 NotImplemented.typedef = TypeDef("NotImplemented",
-    __new__ = interp2app(lambda space, w_type: space.w_NotImplemented),
+    __new__ = interp2app(NotImplemented.descr_new_notimplemented),
     __repr__ = interp2app(NotImplemented.descr__repr__),
 )
 NotImplemented.typedef.acceptable_as_base_class = False
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to