1
0
forked from VimPlug/jedi

parsing.Parser.scope -> parsing.Parser._scope, fixes #224

This commit is contained in:
David Halter
2013-05-19 10:25:00 +04:30
parent ec061ea612
commit c5169b2d66
3 changed files with 40 additions and 40 deletions

View File

@@ -16,11 +16,11 @@ is the easiest way to write a parser. The same behaviour applies to ``Param``,
which is being used in a function definition.
The easiest way to play with this module is to use :class:`parsing.Parser`.
:attr:`parsing.Parser.scope` holds an instance of :class:`SubModule`:
:attr:`parsing.Parser.module` holds an instance of :class:`SubModule`:
>>> from jedi.parsing import Parser
>>> parser = Parser('import os', 'example.py')
>>> submodule = parser.scope
>>> submodule = parser.module
>>> submodule
<SubModule: example.py@1-1>
@@ -247,14 +247,14 @@ class Scope(Simple, IsScope):
... b = y
... b.c = z
... ''')
>>> parser.scope.get_defined_names()
>>> parser.module.get_defined_names()
[<Name: a@2,0>, <Name: b@3,0>]
Note that unlike :meth:`get_set_vars`, assignment to object
attribute does not change the result because it does not change
the defined names in this scope.
>>> parser.scope.get_set_vars()
>>> parser.module.get_set_vars()
[<Name: a@2,0>, <Name: b@3,0>, <Name: b.c@4,0>]
"""