[pypy-svn] r7296 - pypy/trunk/src/pypy/objspace/std

bob at codespeak.net bob at codespeak.net
Tue Nov 16 17:38:32 CET 2004


Author: bob
Date: Tue Nov 16 17:38:31 2004
New Revision: 7296

Modified:
   pypy/trunk/src/pypy/objspace/std/typetype.py
Log:
add mro() to type objects


Modified: pypy/trunk/src/pypy/objspace/std/typetype.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/typetype.py	(original)
+++ pypy/trunk/src/pypy/objspace/std/typetype.py	Tue Nov 16 17:38:31 2004
@@ -23,6 +23,9 @@
     # XXX this should be inside typeobject.py
     return space.newtuple(w_type.mro_w)
 
+def descr_mro(space, w_type):
+    return space.newlist(w_type.mro_w)
+
 def descr__bases(space, w_type):
     return space.newtuple(w_type.bases_w)
 
@@ -44,4 +47,5 @@
     __base__ = GetSetProperty(descr__base),
     __mro__ = GetSetProperty(descr_get__mro__),
     __dict__ = default_dict_descr,
+    mro = newmethod(descr_mro),
     )



More information about the Pypy-commit mailing list