Show More
@@ -1,9 +1,26 | |||||
1 | The completer Completion API has seen an overhaul. The old |
|
1 | The completer Completion API has seen an overhaul. The old | |
2 | ``Completer.complete()`` API is waiting deprecation and will soon be replaced |
|
2 | ``Completer.complete()`` API is waiting deprecation and will soon be replaced | |
3 | by the ``Completer.completions()`` one. While the ``Completer.complete()`` API |
|
3 | by ``Completer.completions()``. | |
4 | was assuming completions would all replace the same range of text in the |
|
4 | ||
5 | completed buffer, ``Completer.completions()`` does not. To smooth the transition |
|
5 | This new API is capable of pulling completions from :any:`jedi`, thus allowing | |
6 | we provide two utility methods ``regulrize...`` and ``stufff`` which can |
|
6 | type inference on non-executed code. If :any:`jedi` is installed completion | |
7 | partially adapt between the old and new API. The new API is marked as |
|
7 | like the following are now becoming possible without code evaluation: | |
8 | "unstable" and can only be use explicitly when called from within a decorator |
|
8 | ||
9 | we provide. |
|
9 | >>> data = ['Number of users', 123_456] | |
|
10 | ... data[0].<tab> | |||
|
11 | ||||
|
12 | IPython is now capable of inferring that `data[0]` is a string, and will | |||
|
13 | suggest completions like `.capitalize`. The completion power of IPython will | |||
|
14 | increase with new Jedi releases, and a number of bugs and more completions are | |||
|
15 | already available on development version of :any:`jedi` if you are curious. | |||
|
16 | ||||
|
17 | User of the prompt_toolkit interface should also see the type of the item they | |||
|
18 | are selecting (method, attribute, module, keyword ...). | |||
|
19 | ||||
|
20 | The use of Jedi also full fill a number of request and fix a number of bugs | |||
|
21 | like case insensitive completion, completion after division operator: See | |||
|
22 | :ghpull:`ipython/ipython#10182`. | |||
|
23 | ||||
|
24 | Extra patches and updates will be needed to the :any:`ipykernel` package for | |||
|
25 | this feature to be available for this to be available to other clients like | |||
|
26 | Notebook, Lab, Nteract, Hydrogen... |
General Comments 0
You need to be logged in to leave comments.
Login now