From 3c154253b5859a341c846a8da63b4b2eb3b9ee21 2017-02-27 18:25:15 From: Matthias Bussonnier Date: 2017-02-27 18:25:15 Subject: [PATCH] Merge pull request #10046 from ivanov/fix-tab-completion restore tab completion behavior --- diff --git a/IPython/utils/dir2.py b/IPython/utils/dir2.py index 50805e0..b50654f 100644 --- a/IPython/utils/dir2.py +++ b/IPython/utils/dir2.py @@ -40,6 +40,9 @@ def dir2(obj): # TypeError: dir(obj) does not return a list words = set() + if safe_hasattr(obj, '__class__'): + words |= set(dir(obj.__class__)) + # filter out non-string attributes which may be stuffed by dir() calls # and poor coding in third-party modules