[pypy-svn] pypy improve-unwrap_spec: Test and fix
amauryfa
commits-noreply at bitbucket.org
Thu Feb 17 20:07:53 CET 2011
Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: improve-unwrap_spec
Changeset: r42118:17c2817d710a
Date: 2011-02-17 17:41 +0100
http://bitbucket.org/pypy/pypy/changeset/17c2817d710a/
Log: Test and fix
diff --git a/pypy/objspace/std/objecttype.py b/pypy/objspace/std/objecttype.py
--- a/pypy/objspace/std/objecttype.py
+++ b/pypy/objspace/std/objecttype.py
@@ -210,6 +210,7 @@
__reduce_ex__ = gateway.interp2app(descr__reduce_ex__),
__reduce__ = gateway.interp2app(descr__reduce__),
__format__ = gateway.interp2app(descr___format__),
- __subclasshook__ = gateway.interp2app(descr___subclasshook__),
+ __subclasshook__ = gateway.interp2app(descr___subclasshook__,
+ as_classmethod=True),
__init__ = gateway.interp2app(descr__init__),
)
diff --git a/pypy/objspace/std/test/test_obj.py b/pypy/objspace/std/test/test_obj.py
--- a/pypy/objspace/std/test/test_obj.py
+++ b/pypy/objspace/std/test/test_obj.py
@@ -68,3 +68,4 @@
class x(object):
pass
assert x().__subclasshook__(object()) is NotImplemented
+ assert x.__subclasshook__(object()) is NotImplemented
More information about the Pypy-commit
mailing list