Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bdb9d48

Browse files
committed
half-hearted stab at supported the 2.2 object model better.
1 parent 31a4c22 commit bdb9d48

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

Mac/Tools/IDE/PyBrowser.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,15 @@ def unpack_other(object, indent = 0):
402402
attrs = attrs + object.__members__
403403
if hasattr(object, '__methods__'):
404404
attrs = attrs + object.__methods__
405+
if hasattr(object, '__dict__'):
406+
attrs = attrs + object.__dict__.keys()
407+
if hasattr(object, '__slots__'):
408+
# XXX??
409+
attrs = attrs + object.__slots__
410+
if hasattr(object, "__class__") and "__class__" not in attrs:
411+
attrs.append("__class__")
412+
if hasattr(object, "__doc__") and "__doc__" not in attrs:
413+
attrs.append("__doc__")
405414
items = []
406415
for attr in attrs:
407416
items.append((attr, getattr(object, attr)))

0 commit comments

Comments
 (0)