185 n = len(attr) |
185 n = len(attr) |
186 for word in words: |
186 for word in words: |
187 try: |
187 try: |
188 if word[:n] == attr and hasattr(thisobject, word): |
188 if word[:n] == attr and hasattr(thisobject, word): |
189 val = getattr(thisobject, word) |
189 val = getattr(thisobject, word) |
190 word = self._callable_postfix(val, "{0}.{1}".format(expr, word)) |
190 word = self._callable_postfix( |
|
191 val, "{0}.{1}".format(expr, word)) |
191 matches.append(word) |
192 matches.append(word) |
192 except: |
193 except: |
193 # some badly behaved objects pollute dir() with non-strings, |
194 # some badly behaved objects pollute dir() with non-strings, |
194 # which cause the completion to fail. This way we skip the |
195 # which cause the completion to fail. This way we skip the |
195 # bad entries and can still continue processing the others. |
196 # bad entries and can still continue processing the others. |