Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
10721:9177c4f6a229 | 10722:7598ce51bf2a |
---|---|
2237 prevnonblank({lnum}) Number line nr of non-blank line <= {lnum} | 2237 prevnonblank({lnum}) Number line nr of non-blank line <= {lnum} |
2238 printf({fmt}, {expr1}...) String format text | 2238 printf({fmt}, {expr1}...) String format text |
2239 pumvisible() Number whether popup menu is visible | 2239 pumvisible() Number whether popup menu is visible |
2240 pyeval({expr}) any evaluate |Python| expression | 2240 pyeval({expr}) any evaluate |Python| expression |
2241 py3eval({expr}) any evaluate |python3| expression | 2241 py3eval({expr}) any evaluate |python3| expression |
2242 pyxeval({expr}) any evaluate |python_x| expression | |
2242 range({expr} [, {max} [, {stride}]]) | 2243 range({expr} [, {max} [, {stride}]]) |
2243 List items from {expr} to {max} | 2244 List items from {expr} to {max} |
2244 readfile({fname} [, {binary} [, {max}]]) | 2245 readfile({fname} [, {binary} [, {max}]]) |
2245 List get list of lines from file {fname} | 2246 List get list of lines from file {fname} |
2246 reltime([{start} [, {end}]]) List get time value | 2247 reltime([{start} [, {end}]]) List get time value |
6161 Lists are represented as Vim |List| type. | 6162 Lists are represented as Vim |List| type. |
6162 Dictionaries are represented as Vim |Dictionary| type, | 6163 Dictionaries are represented as Vim |Dictionary| type, |
6163 non-string keys result in error. | 6164 non-string keys result in error. |
6164 {only available when compiled with the |+python| feature} | 6165 {only available when compiled with the |+python| feature} |
6165 | 6166 |
6167 pyxeval({expr}) *pyxeval()* | |
6168 Evaluate Python expression {expr} and return its result | |
6169 converted to Vim data structures. | |
6170 Uses Python 2 or 3, see |python_x| and 'pyxversion'. | |
6171 See also: |pyeval()|, |py3eval()| | |
6172 {only available when compiled with the |+python| or the | |
6173 |+python3| feature} | |
6174 | |
6166 *E726* *E727* | 6175 *E726* *E727* |
6167 range({expr} [, {max} [, {stride}]]) *range()* | 6176 range({expr} [, {max} [, {stride}]]) *range()* |
6168 Returns a |List| with Numbers: | 6177 Returns a |List| with Numbers: |
6169 - If only {expr} is specified: [0, 1, ..., {expr} - 1] | 6178 - If only {expr} is specified: [0, 1, ..., {expr} - 1] |
6170 - If {max} is specified: [{expr}, {expr} + 1, ..., {max}] | 6179 - If {max} is specified: [{expr}, {expr} + 1, ..., {max}] |
8400 postscript Compiled with PostScript file printing. | 8409 postscript Compiled with PostScript file printing. |
8401 printer Compiled with |:hardcopy| support. | 8410 printer Compiled with |:hardcopy| support. |
8402 profile Compiled with |:profile| support. | 8411 profile Compiled with |:profile| support. |
8403 python Compiled with Python 2.x interface. |has-python| | 8412 python Compiled with Python 2.x interface. |has-python| |
8404 python3 Compiled with Python 3.x interface. |has-python| | 8413 python3 Compiled with Python 3.x interface. |has-python| |
8414 pythonx Compiled with |python_x| interface. |has-pythonx| | |
8405 qnx QNX version of Vim. | 8415 qnx QNX version of Vim. |
8406 quickfix Compiled with |quickfix| support. | 8416 quickfix Compiled with |quickfix| support. |
8407 reltime Compiled with |reltime()| support. | 8417 reltime Compiled with |reltime()| support. |
8408 rightleft Compiled with 'rightleft' support. | 8418 rightleft Compiled with 'rightleft' support. |
8409 ruby Compiled with Ruby interface |ruby|. | 8419 ruby Compiled with Ruby interface |ruby|. |