Author: Philip Jenvey <pjen...@underboss.org>
Branch: py3.3
Changeset: r74192:5c26d14cf18c
Date: 2014-10-24 13:51 -0700
http://bitbucket.org/pypy/pypy/changeset/5c26d14cf18c/

Log:    readapt 032296946827

diff --git a/pypy/objspace/std/noneobject.py b/pypy/objspace/std/noneobject.py
--- a/pypy/objspace/std/noneobject.py
+++ b/pypy/objspace/std/noneobject.py
@@ -7,6 +7,11 @@
     def unwrap(w_self, space):
         return None
 
+    @staticmethod
+    def descr_new(space, w_type):
+        """T.__new__(S, ...) -> a new object with type S, a subtype of T"""
+        return space.w_None
+
     def descr_bool(self, space):
         return space.w_False
 
@@ -17,6 +22,7 @@
 W_NoneObject.w_None = W_NoneObject()
 
 W_NoneObject.typedef = StdTypeDef("NoneType",
+    __new__ = interp2app(W_NoneObject.descr_new),
     __bool__ = interp2app(W_NoneObject.descr_bool),
     __repr__ = interp2app(W_NoneObject.descr_repr),
 )
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to