parameters: (self)
return_statement: return helpers.sorted_definitions(set(defs))
docstring: Return the definitions of a the path under the cursor.  goto function!
          This follows complicated paths and returns the end, not the first
          definition. The big difference between :meth:`goto_assignments` and
          :meth:`goto_definitions` is that :meth:`goto_assignments` 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.
  
          :rtype: list of :class:`classes.Definition`
docstring_summary: Return the definitions of a the path under the cursor.  goto function!
          This follows complicated paths and returns the end, not the first
          definition. The big difference between :meth:`goto_assignments` and
          :meth:`goto_definitions` is that :meth:`goto_assignments` 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.
docstring_tokens: Return the definitions of a the path under the cursor . goto function! This follows complicated paths and returns the end not the first definition . The big difference between : meth : goto_assignments and : meth : goto_definitions is that : meth : goto_assignments 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 .
function: def goto_definitions(self):
          """
          Return the definitions of a the path under the cursor.  goto function!
          This follows complicated paths and returns the end, not the first
          definition. The big difference between :meth:`goto_assignments` and
          :meth:`goto_definitions` is that :meth:`goto_assignments` 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.
  
          :rtype: list of :class:`classes.Definition`
          """
          leaf = self._module_node.get_name_of_position(self._pos)
          if leaf is None:
              leaf = self._module_node.get_leaf_for_position(self._pos)
              if leaf is None:
                  return []
  
          context = self._evaluator.create_context(self._get_module(), leaf)
          definitions = helpers.evaluate_goto_definition(self._evaluator, context, leaf)
  
          names = [s.name for s in definitions]
          defs = [classes.Definition(self._evaluator, name) for name in names]
          # The additional set here allows the definitions to become unique in an
          # API sense. In the internals we want to separate more things than in
          # the API.
          return helpers.sorted_definitions(set(defs))
function_tokens: def goto_definitions ( self ) : leaf = self . _module_node . get_name_of_position ( self . _pos ) if leaf is None : leaf = self . _module_node . get_leaf_for_position ( self . _pos ) if leaf is None : return [ ] context = self . _evaluator . create_context ( self . _get_module ( ) , leaf ) definitions = helpers . evaluate_goto_definition ( self . _evaluator , context , leaf ) names = [ s . name for s in definitions ] defs = [ classes . Definition ( self . _evaluator , name ) for name in names ] # The additional set here allows the definitions to become unique in an # API sense. In the internals we want to separate more things than in # the API. return helpers . sorted_definitions ( set ( defs ) )