diff --git a/jedi/api_classes.py b/jedi/api_classes.py index 86215327..e50fa6e1 100644 --- a/jedi/api_classes.py +++ b/jedi/api_classes.py @@ -148,8 +148,7 @@ class BaseDefinition(object): stripped = stripped.parent return type(stripped).__name__.lower() - @property - def path(self): + def _path(self): """The module path.""" path = [] @@ -285,7 +284,7 @@ class BaseDefinition(object): (for example) ``'posixpath.join'``. """ - path = [unicode(p) for p in self.path] + path = [unicode(p) for p in self._path()] # TODO add further checks, the mapping should only occur on stdlib. if not path: return None # for keywords the path is empty @@ -395,7 +394,7 @@ class Completion(BaseDefinition): if t == 'statement' or t == 'import': desc = self._definition.get_code(False) else: - desc = '.'.join(unicode(p) for p in self.path) + desc = '.'.join(unicode(p) for p in self._path()) line = '' if self.in_builtin_module else '@%s' % self.line return '%s: %s%s' % (t, desc, line)