1
0
forked from VimPlug/jedi

fix python 2.7 issues. the parser now only takes unicode inputs

This commit is contained in:
Dave Halter
2014-02-23 11:44:32 +01:00
parent c5fcebde82
commit 8e847f4982
7 changed files with 63 additions and 57 deletions
+5 -3
View File
@@ -18,8 +18,9 @@ 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.module` holds an instance of :class:`SubModule`:
>>> from jedi._compatibility import u
>>> from jedi.parser import Parser
>>> parser = Parser('import os', 'example.py')
>>> parser = Parser(u('import os'), 'example.py')
>>> submodule = parser.module
>>> submodule
<SubModule: example.py@1-1>
@@ -283,12 +284,13 @@ class Scope(Simple, IsScope):
"""
Get all defined names in this scope.
>>> from jedi._compatibility import u
>>> from jedi.parser import Parser
>>> parser = Parser('''
>>> parser = Parser(u('''
... a = x
... b = y
... b.c = z
... ''')
... '''))
>>> parser.module.get_defined_names()
[<Name: a@2,0>, <Name: b@3,0>]