[pypy-commit] pypy kill-unary-multimethods: backout 96571e83c308

fijal noreply at buildbot.pypy.org
Sun Sep 25 00:58:53 CEST 2011


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: kill-unary-multimethods
Changeset: r47592:d0e6e3e4d2b0
Date: 2011-09-24 19:56 -0300
http://bitbucket.org/pypy/pypy/changeset/d0e6e3e4d2b0/

Log:	backout 96571e83c308

diff --git a/pypy/objspace/descroperation.py b/pypy/objspace/descroperation.py
--- a/pypy/objspace/descroperation.py
+++ b/pypy/objspace/descroperation.py
@@ -872,7 +872,7 @@
             _impl_maker = _make_unaryop_impl
         if _impl_maker:
             setattr(DescrOperation,_name,_impl_maker(_symbol,_specialnames))
-        elif _name not in ['is_', 'id','type',
+        elif _name not in ['is_', 'id','type','issubtype',
                            # not really to be defined in DescrOperation
                            'ord', 'unichr', 'unicode']:
             raise Exception, "missing def for operation %s" % _name
diff --git a/pypy/objspace/std/typeobject.py b/pypy/objspace/std/typeobject.py
--- a/pypy/objspace/std/typeobject.py
+++ b/pypy/objspace/std/typeobject.py
@@ -868,6 +868,12 @@
 def _pure_issubtype(w_sub, w_type, version_tag1, version_tag2):
     return _issubtype(w_sub, w_type)
 
+def issubtype__Type_Type(space, w_type, w_sub):
+    return space.newbool(w_sub.issubtype(w_type))
+
+def isinstance__Type_ANY(space, w_type, w_inst):
+    return space.newbool(space.type(w_inst).issubtype(w_type))
+
 def repr__Type(space, w_obj):
     w_mod = w_obj.get_module()
     if not space.isinstance_w(w_mod, space.w_str):


More information about the pypy-commit mailing list