diff options
author | Bram Moolenaar <Bram@vim.org> | 2013-05-30 13:05:58 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2013-05-30 13:05:58 +0200 |
commit | 78cddbe2712b5e2bad3928f38345019d6803f31f (patch) | |
tree | d94943777a75e6517c593e465d71e6780f805e85 /src/testdir/test87.in | |
parent | a9922d62e60142f1cb9889626e82e8cc7126be1a (diff) | |
download | vim-git-78cddbe2712b5e2bad3928f38345019d6803f31f.tar.gz |
updated for version 7.3.1062v7.3.1062
Problem: Python: List is not standard.
Solution: Python patch 21: Add standard methods and fields. (ZyX)
Diffstat (limited to 'src/testdir/test87.in')
-rw-r--r-- | src/testdir/test87.in | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/testdir/test87.in b/src/testdir/test87.in index 20f616fdb..82edc8bad 100644 --- a/src/testdir/test87.in +++ b/src/testdir/test87.in @@ -692,10 +692,12 @@ del name del o EOF :" -:" Test vim.Dictionary.__new__ +:" Test vim.*.__new__ :$put =string(py3eval('vim.Dictionary({})')) :$put =string(py3eval('vim.Dictionary(a=1)')) :$put =string(py3eval('vim.Dictionary(((''a'', 1),))')) +:$put =string(py3eval('vim.List()')) +:$put =string(py3eval('vim.List(iter(''abc''))')) :" :" Test stdout/stderr :redir => messages @@ -713,8 +715,18 @@ class DupDict(vim.Dictionary): super(DupDict, self).__setitem__('dup_' + key, value) dd = DupDict() dd['a'] = 'b' + +class DupList(vim.List): + def __getitem__(self, idx): + return [super(DupList, self).__getitem__(idx)] * 2 + +dl = DupList() +dl2 = DupList(iter('abc')) +dl.extend(dl2[0]) EOF :$put =string(sort(keys(py3eval('dd')))) +:$put =string(py3eval('dl')) +:$put =string(py3eval('dl2')) :" :" Test exceptions :fun Exe(e) |