[pypy-commit] pypy py3.3: readapt 032296946827
pjenvey
noreply at buildbot.pypy.org
Fri Oct 24 22:57:24 CEST 2014
Author: Philip Jenvey <pjenvey at 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),
)
More information about the pypy-commit
mailing list