[pypy-svn] rev 2508 - pypy/trunk/src/pypy/objspace/std

pmaupin at codespeak.net pmaupin at codespeak.net
Thu Dec 18 16:03:44 CET 2003


Author: pmaupin
Date: Thu Dec 18 16:03:44 2003
New Revision: 2508

Modified:
   pypy/trunk/src/pypy/objspace/std/typeobject.py
Log:
Added __bases__ attribute to type object

Modified: pypy/trunk/src/pypy/objspace/std/typeobject.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/typeobject.py	(original)
+++ pypy/trunk/src/pypy/objspace/std/typeobject.py	Thu Dec 18 16:03:44 2003
@@ -208,6 +208,8 @@
         return w_type.w_tpname
     if space.is_true(space.eq(w_attr, space.wrap('__mro__'))):
         return space.newtuple(list(w_type.getmro()))
+    if space.is_true(space.eq(w_attr, space.wrap('__bases__'))):
+        return space.newtuple(list(w_type.getbases()))
     try:
         desc = w_type.lookup(w_attr)
     except KeyError:


More information about the Pypy-commit mailing list