Mercurial > vim
diff runtime/doc/eval.txt @ 10722:7598ce51bf2a v8.0.0251
patch 8.0.0251: not easy to select Python 2 or 3
commit https://github.com/vim/vim/commit/f42dd3c3901ea0ba38e67a616aea9953cae81b8d
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jan 28 16:06:38 2017 +0100
patch 8.0.0251: not easy to select Python 2 or 3
Problem: It is not so easy to write a script that works with both Python 2
and Python 3, even when the Python code works with both.
Solution: Add 'pyxversion', :pyx, etc. (Marc Weber, Ken Takata)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 28 Jan 2017 16:15:04 +0100 |
parents | 9a75c8a1b8b1 |
children | 44e9340dc604 |
line wrap: on
line diff
--- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -2239,6 +2239,7 @@ printf({fmt}, {expr1}...) String format pumvisible() Number whether popup menu is visible pyeval({expr}) any evaluate |Python| expression py3eval({expr}) any evaluate |python3| expression +pyxeval({expr}) any evaluate |python_x| expression range({expr} [, {max} [, {stride}]]) List items from {expr} to {max} readfile({fname} [, {binary} [, {max}]]) @@ -6163,6 +6164,14 @@ pyeval({expr}) *pyeval()* non-string keys result in error. {only available when compiled with the |+python| feature} +pyxeval({expr}) *pyxeval()* + Evaluate Python expression {expr} and return its result + converted to Vim data structures. + Uses Python 2 or 3, see |python_x| and 'pyxversion'. + See also: |pyeval()|, |py3eval()| + {only available when compiled with the |+python| or the + |+python3| feature} + *E726* *E727* range({expr} [, {max} [, {stride}]]) *range()* Returns a |List| with Numbers: @@ -8402,6 +8411,7 @@ printer Compiled with |:hardcopy| supp profile Compiled with |:profile| support. python Compiled with Python 2.x interface. |has-python| python3 Compiled with Python 3.x interface. |has-python| +pythonx Compiled with |python_x| interface. |has-pythonx| qnx QNX version of Vim. quickfix Compiled with |quickfix| support. reltime Compiled with |reltime()| support.