comparison runtime/doc/if_pyth.txt @ 4698:2db005052371 v7.3.1096

updated for version 7.3.1096 Problem: Python: popitem() was not defined in a standard way. Solution: Remove the argument from popitem(). (ZyX)
author Bram Moolenaar <bram@vim.org>
date Sun, 02 Jun 2013 17:41:54 +0200
parents 2eb30f341e8d
children 0c25fa1dfd97
comparison
equal deleted inserted replaced
4697:c905c60b1860 4698:2db005052371
172 'eval_expr', 'kind': 'f', 'filename': './src/eval.c'}] 172 'eval_expr', 'kind': 'f', 'filename': './src/eval.c'}]
173 173
174 vim.bindeval(str) *python-bindeval* 174 vim.bindeval(str) *python-bindeval*
175 Like |python-eval|, but returns special objects described in 175 Like |python-eval|, but returns special objects described in
176 |python-bindeval-objects|. These python objects let you modify (|List| 176 |python-bindeval-objects|. These python objects let you modify (|List|
177 or |Dictionary|) or call (|Funcref|) vim objecs. 177 or |Dictionary|) or call (|Funcref|) vim objects.
178 178
179 Error object of the "vim" module 179 Error object of the "vim" module
180 180
181 vim.error *python-error* 181 vim.error *python-error*
182 Upon encountering a Vim error, Python raises an exception of type 182 Upon encountering a Vim error, Python raises an exception of type
206 object supports the following operations: > 206 object supports the following operations: >
207 :py w = vim.windows[i] # Indexing (read-only) 207 :py w = vim.windows[i] # Indexing (read-only)
208 :py w in vim.windows # Membership test 208 :py w in vim.windows # Membership test
209 :py n = len(vim.windows) # Number of elements 209 :py n = len(vim.windows) # Number of elements
210 :py for w in vim.windows: # Sequential access 210 :py for w in vim.windows: # Sequential access
211 < Note: vim.windows object always accesses current tab page,. 211 < Note: vim.windows object always accesses current tab page.
212 |python-tabpage|.windows objects are bound to parent |python-tabpage| 212 |python-tabpage|.windows objects are bound to parent |python-tabpage|
213 object and always use windows from that tab page (or throw vim.error 213 object and always use windows from that tab page (or throw vim.error
214 in case tab page was deleted). You can keep a reference to both 214 in case tab page was deleted). You can keep a reference to both
215 without keeping a reference to vim module object or |python-tabpage|, 215 without keeping a reference to vim module object or |python-tabpage|,
216 they will not lose their properties in this case. 216 they will not lose their properties in this case.
492 not present. 492 not present.
493 pop(key[, default]) 493 pop(key[, default])
494 Remove specified key from dictionary and return 494 Remove specified key from dictionary and return
495 corresponding value. If key is not found and default is 495 corresponding value. If key is not found and default is
496 given returns the default, otherwise raises KeyError. 496 given returns the default, otherwise raises KeyError.
497 popitem(key) 497 popitem()
498 Remove specified key from dictionary and return a pair 498 Remove random key from dictionary and return (key, value)
499 with it and the corresponding value. Returned key is a new 499 pair.
500 object.
501 has_key(key) 500 has_key(key)
502 Check whether dictionary contains specified key, similar 501 Check whether dictionary contains specified key, similar
503 to `key in dict`. 502 to `key in dict`.
504 503
505 __new__(), __new__(iterable), __new__(dictionary), __new__(update) 504 __new__(), __new__(iterable), __new__(dictionary), __new__(update)