1
0
forked from VimPlug/jedi

dynamic docstring improvements

This commit is contained in:
David Halter
2013-02-23 22:21:34 +04:30
parent e8feb0b7d2
commit 68ace0d05b

View File

@@ -2,25 +2,25 @@
To understand Python on a deeper level, |jedi| needs to understand some of the
dynamic features of Python, however this probably the most complicated part:
- Array modifications (e.g. `list.append`)
- Array modifications (e.g. ``list.append``)
- Parameter completion in functions
- Flow checks (e.g. `if isinstance(a, str)` -> a is a str)
- Flow checks (e.g. ``if isinstance(a, str)`` -> a is a str)
Array modifications
*******************
If the content of an array (`set`/`list`) is wanted somewhere, the current
module will be checked for appearances of `arr.append`, `arr.insert`, etc. If
the `arr` name points to an actual array, the content will be added
If the content of an array (``set``/``list``) is wanted somewhere, the current
module will be checked for appearances of ``arr.append``, ``arr.insert``, etc.
If the ``arr`` name points to an actual array, the content will be added
This can be really cpu intensive, as you can imagine. Because |jedi| has to
follow **every** `append`. However this works pretty good, because in *slow*
follow **every** ``append``. However this works pretty good, because in *slow*
cases, the recursion detector and other settings will stop this process.
It is important to note that:
1. Array modfications work only in the current module
2. Only Array additions are being checked, `list.pop`, etc. is being ignored.
2. Only Array additions are being checked, ``list.pop``, etc. is being ignored.
Parameter completion
********************
@@ -36,10 +36,11 @@ There's no doubt wheter bar is an ``int`` or not, but if there's also a call
like ``foo('str')``, what would happen? Well, we'll just show both. Because
that's what a human would expect.
It works as follows::
It works as follows:
- A param is being encountered
- search for function calls named ``foo``
- execute these calls and check the injected params. This work with an
- execute these calls and check the injected params. This work with a
``ParamListener``.
Flow checks