Make sure python_to_vim function is able to format lists

Fixes #1268
This commit is contained in:
ZyX 2015-01-11 18:19:16 +03:00
parent d562844a1a
commit f1aeb7a59a
1 changed files with 5 additions and 0 deletions

View File

@ -50,6 +50,11 @@ python_to_vim_types = {
ord('\''): '\'\'',
}).encode(vim_encoding)) + b'\''
),
list: (
lambda o: b'[' + (
b','.join((python_to_vim(i) for i in o))
) + b']'
),
bytes: (lambda o: b'\'' + o.replace(b'\'', b'\'\'') + b'\''),
int: (str if str is bytes else (lambda o: unicode(o).encode('ascii'))),
}