]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Backport of 1.13:
authorJack Jansen <jack.jansen@cwi.nl>
Sun, 24 Feb 2002 23:11:34 +0000 (23:11 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Sun, 24 Feb 2002 23:11:34 +0000 (23:11 +0000)
half-hearted stab at supported the 2.2 object model better.

Mac/Tools/IDE/PyBrowser.py

index 67831c066a3e9fa311a8795d24420ea6ae2a7c27..74849dfb8222bce2d5ff27d2a47647022f5fe656 100644 (file)
@@ -402,6 +402,15 @@ def unpack_other(object, indent = 0):
                attrs = attrs + object.__members__
        if hasattr(object, '__methods__'):
                attrs = attrs + object.__methods__
+       if hasattr(object, '__dict__'):
+               attrs = attrs + object.__dict__.keys()
+       if hasattr(object, '__slots__'):
+               # XXX??
+               attrs = attrs + object.__slots__
+       if hasattr(object, "__class__") and "__class__" not in attrs:
+               attrs.append("__class__")
+       if hasattr(object, "__doc__") and "__doc__" not in attrs:
+               attrs.append("__doc__")
        items = []
        for attr in attrs:
                items.append((attr, getattr(object, attr)))