diff --git a/jedi/api.py b/jedi/api.py index 2f854e09..0e9aa7ab 100644 --- a/jedi/api.py +++ b/jedi/api.py @@ -256,7 +256,7 @@ class Script(object): def get_definition(self): """ - Returns the definitions of a the path under the cursor. This is + Returns the definitions of a the path under the cursor. This is not a goto function! This follows complicated paths and returns the end, not the first definition. @@ -290,7 +290,10 @@ class Script(object): return sorted(d, key=lambda x: (x.module_path, x.start_pos)) def goto(self): - """ TODO doc """ + """ + Returns the first definition found by goto. This means: It doesn't + follow imports and statements. + """ d = [Definition(d) for d in set(self._goto()[0])] return sorted(d, key=lambda x: (x.module_path, x.start_pos)) diff --git a/jedi/evaluate.py b/jedi/evaluate.py index 078809fc..5cb868b2 100644 --- a/jedi/evaluate.py +++ b/jedi/evaluate.py @@ -10,11 +10,11 @@ statement. TODO magic methods: __mul__, __add__, etc. TODO evaluate asserts/isinstance (type safety) +TODO super() TODO nonlocal statement, needed or can be ignored? (py3k) TODO __ instance attributes should not be visible outside of the class. -TODO getattr / __getattr__ / __getattribute__ ? """ from _compatibility import next, property, hasattr, is_py3k, use_metaclass