Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(0)  |  Derive(0)  |  Import(2)
Get all definitions in `source` sorted by its position.

This functions can be used for listing functions, classes and
data defined in a file.  This can be useful if you want to list
them in "sidebar".  Each element in the returned list also has
`defined_names` method which can be used to get sub-definitions
(e.g., methods in class).

:rtype: list of api_classes.Definition

        def defined_names(source, path=None, source_encoding='utf-8'):
    """
    Get all definitions in `source` sorted by its position.

    This functions can be used for listing functions, classes and
    data defined in a file.  This can be useful if you want to list
    them in "sidebar".  Each element in the returned list also has
    `defined_names` method which can be used to get sub-definitions
    (e.g., methods in class).

    :rtype: list of api_classes.Definition
    """
    parser = parsing.Parser(
        modules.source_to_unicode(source, source_encoding),
        module_path=path,
    )
    return api_classes._defined_names(parser.module)
        


src/a/n/anaconda-HEAD/anaconda_lib/jedi/__init__.py   anaconda(Download)
 
from .api import Script, Interpreter, NotFoundError, set_debug_function
from .api import preload_module, defined_names
from . import settings
 

src/j/e/jedi-0.7.0/jedi/__init__.py   jedi(Download)
 
from .api import Script, Interpreter, NotFoundError, set_debug_function
from .api import preload_module, defined_names
from . import settings