1
0
forked from VimPlug/jedi

Remove the module attribute from the parser.

This commit is contained in:
Dave Halter
2017-03-18 03:53:34 +01:00
parent d0b6d41e99
commit 0f66a3c7a8
11 changed files with 21 additions and 20 deletions

View File

@@ -16,14 +16,14 @@ The easiest way to play with this module is to use :class:`parsing.Parser`.
>>> from jedi.parser.python import load_grammar
>>> from jedi.parser import ParserWithRecovery
>>> parser = ParserWithRecovery(load_grammar(), u('import os'), 'example.py')
>>> submodule = parser.module
>>> submodule
>>> module = parser.get_root_node()
>>> module
<Module: example.py@1-1>
Any subclasses of :class:`Scope`, including :class:`Module` has an attribute
:attr:`imports <Scope.imports>`:
>>> submodule.imports
>>> module.imports
[<ImportName: import os@1,0>]
See also :attr:`Scope.subscopes` and :attr:`Scope.statements`.