1
0
forked from VimPlug/jedi

Improve some documentation about name with symbols, name and completion.

This commit is contained in:
Matthias Bussonnier
2017-01-19 11:07:14 -08:00
parent 7300f3e7ef
commit 0f865a17ef

View File

@@ -432,22 +432,35 @@ class Completion(BaseDefinition):
"""
Return the rest of the word, e.g. completing ``isinstance``::
# <-- Cursor is here
isinstan# <-- Cursor is here
would return the string 'ce'. It also adds additional stuff, depending
on your `settings.py`.
Assuming the following function definition::
def foo(param=0):
pass
completing ``foo(par`` would give a ``Completion`` which `complete`
would be `am=`
"""
return self._complete(True)
@property
def name_with_symbols(self):
"""
Similar to :attr:`name`, but like :attr:`name`
returns also the symbols, for example::
Similar to :attr:`name`, but like :attr:`name` returns also the
symbols, for example assuming the following function definition::
list()
def foo(param=0):
pass
completing ``foo(`` would give a ``Completion`` which
``name_with_symbols`` would be "param=".
would return ``.append`` and others (which means it adds a dot).
"""
return self._complete(False)