From 2a1ac82e0419878b41121e619062cc511e323cf2 Mon Sep 17 00:00:00 2001 From: David Halter Date: Wed, 7 Nov 2012 18:04:25 +0100 Subject: [PATCH] add documentation, why goto can return multiple objects -> fixes #42 --- jedi/api.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/jedi/api.py b/jedi/api.py index 2d3fbb3b..342ad849 100644 --- a/jedi/api.py +++ b/jedi/api.py @@ -335,6 +335,9 @@ class Script(object): end, not the first definition. The big difference of goto and get_definition is that goto doesn't follow imports and statements. + Multiple objects may be returned, because Python itself is a dynamic + language, which means depending on an option you can have two different + versions of a function. :return: list of Definition objects, which are basically scopes. :rtype: list @@ -369,6 +372,9 @@ class Script(object): """ Returns the first definition found by goto. This means: It doesn't follow imports and statements. + Multiple objects may be returned, because Python itself is a dynamic + language, which means depending on an option you can have two different + versions of a function. :return: list of Definition objects, which are basically scopes. """