diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2002-02-24 23:11:34 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2002-02-24 23:11:34 (GMT) |
commit | f518d6b161fe105a2b342bc5ee3a2a5e5274b1eb (patch) | |
tree | 202da11222d3cf0e9a857deb5fb36d335abf5e22 | |
parent | fef4a032e494ee7795775d024d0f0f4ab646bbab (diff) | |
download | cpython-f518d6b161fe105a2b342bc5ee3a2a5e5274b1eb.zip cpython-f518d6b161fe105a2b342bc5ee3a2a5e5274b1eb.tar.gz cpython-f518d6b161fe105a2b342bc5ee3a2a5e5274b1eb.tar.bz2 |
Backport of 1.13:
half-hearted stab at supported the 2.2 object model better.
-rw-r--r-- | Mac/Tools/IDE/PyBrowser.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Mac/Tools/IDE/PyBrowser.py b/Mac/Tools/IDE/PyBrowser.py index 67831c0..74849df 100644 --- a/Mac/Tools/IDE/PyBrowser.py +++ b/Mac/Tools/IDE/PyBrowser.py @@ -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))) |