summaryrefslogtreecommitdiffstats
path: root/runtime/doc/if_pyth.txt
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2006-01-20 23:02:51 +0000
committerBram Moolenaar <Bram@vim.org>2006-01-20 23:02:51 +0000
commit2d3f489e09a1cc50f5b7601eff568a4eb87fbd51 (patch)
treea29e0aabb8e2ee8bba220b843d536dca3fdf2100 /runtime/doc/if_pyth.txt
parent8ada17c4d9d783b370d081c2a947ea1350cc8338 (diff)
updated for version 7.0183
Diffstat (limited to 'runtime/doc/if_pyth.txt')
-rw-r--r--runtime/doc/if_pyth.txt16
1 files changed, 13 insertions, 3 deletions
diff --git a/runtime/doc/if_pyth.txt b/runtime/doc/if_pyth.txt
index 3ceeff88e2..b0f6286164 100644
--- a/runtime/doc/if_pyth.txt
+++ b/runtime/doc/if_pyth.txt
@@ -1,4 +1,4 @@
-*if_pyth.txt* For Vim version 7.0aa. Last change: 2005 Oct 14
+*if_pyth.txt* For Vim version 7.0aa. Last change: 2006 Jan 20
VIM REFERENCE MANUAL by Paul Moore
@@ -131,14 +131,24 @@ vim.command(str) *python-command*
vim.eval(str) *python-eval*
Evaluates the expression str using the vim internal expression
- evaluator (see |expression|). Returns the expression result as a
- string.
+ evaluator (see |expression|). Returns the expression result as:
+ - a string if the Vim expression evaluates to a string or number
+ - a list if the Vim expression evaluates to a Vim list
+ - a dictionary if the Vim expression evaluates to a Vim dictionary
+ Dictionaries and lists are recursively expanded.
Examples: >
:py text_width = vim.eval("&tw")
:py str = vim.eval("12+12") # NB result is a string! Use
# string.atoi() to convert to
# a number.
+ :py tagList = vim.eval('taglist("eval_expr")')
+< The latter will return a python list of python dicts, for instance:
+ [{'cmd': '/^eval_expr(arg, nextcmd)$/', 'static': 0, 'name':
+ 'eval_expr', 'kind': 'f', 'filename': './src/eval.c'}]
+
+
+
Error object of the "vim" module
vim.error *python-error*