diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-05-25 20:39:09 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-05-25 20:39:09 +0200 |
commit | 2177f9fe18a927ef65ccebb0856722a28dc00252 (patch) | |
tree | c75dc489980efd00171f826a8c62e1b92b1fe9c5 /runtime/doc/if_pyth.txt | |
parent | 03e19a04ac2ca55643663b97b6ab94043233dcbd (diff) | |
download | vim-2177f9fe18a927ef65ccebb0856722a28dc00252.zip |
patch 7.4.1843
Problem: Tests involving Python are flaky.
Solution: Set the pt_auto field. Add tests. (Nikolai Pavlov)
Diffstat (limited to 'runtime/doc/if_pyth.txt')
-rw-r--r-- | runtime/doc/if_pyth.txt | 38 |
1 files changed, 25 insertions, 13 deletions
diff --git a/runtime/doc/if_pyth.txt b/runtime/doc/if_pyth.txt index cec23dbec..d9ae02560 100644 --- a/runtime/doc/if_pyth.txt +++ b/runtime/doc/if_pyth.txt @@ -659,19 +659,31 @@ vim.Function object *python-Function* `vim.bindeval('function(%s)'%json.dumps(name))`. Attributes (read-only): - Attribute Description ~ - name Function name. - args `None` or a |python-List| object with arguments. Note that - this is a copy of the arguments list, constructed each time - you request this attribute. Modifications made to the list - will be ignored (but not to the containers inside argument - list: this is like |copy()| and not |deepcopy()|). - self `None` or a |python-Dictionary| object with self - dictionary. Note that explicit `self` keyword used when - calling resulting object overrides this attribute. - - Constructor additionally accepts `args` and `self` keywords. If any of - them is given then it constructs a partial, see |function()|. + Attribute Description ~ + name Function name. + args `None` or a |python-List| object with arguments. Note + that this is a copy of the arguments list, constructed + each time you request this attribute. Modifications made + to the list will be ignored (but not to the containers + inside argument list: this is like |copy()| and not + |deepcopy()|). + self `None` or a |python-Dictionary| object with self + dictionary. Note that explicit `self` keyword used when + calling resulting object overrides this attribute. + auto_rebind Boolean. True if partial created from this Python object + and stored in the VimL dictionary should be automatically + rebound to the dictionary it is stored in when this + dictionary is indexed. Exposes Vim internal difference + between `dict.func` (auto_rebind=True) and + `function(dict.func,dict)` (auto_rebind=False). This + attribute makes no sense if `self` attribute is `None`. + + Constructor additionally accepts `args`, `self` and `auto_rebind` + keywords. If `args` and/or `self` argument is given then it constructs + a partial, see |function()|. `auto_rebind` is only used when `self` + argument is given, otherwise it is assumed to be `True` regardless of + whether it was given or not. If `self` is given then it defaults to + `False`. Examples: > f = vim.Function('tr') # Constructor |