Problem: Python None value can't be converted to a Vim value.
Solution: Just use zero. (Damien)
}
else
{
- if (ConvertFromPyObject(run_ret, rettv) == -1)
+ if (run_ret != Py_None && ConvertFromPyObject(run_ret, rettv) == -1)
EMSG(_("E859: Failed to convert returned python object to vim value"));
Py_DECREF(run_ret);
}
:$put =string(l)
:let d=pyeval('{"a": "b", "c": 1, "d": ["e"]}')
:$put =sort(items(d))
+:let v:errmsg = ''
+:$put ='pyeval(\"None\") = ' . pyeval('None') . v:errmsg
:if has('float')
: let f=pyeval('0.0')
: $put =string(f)
['a', 'b']
['c', 1]
['d', ['e']]
+pyeval("None") = 0
0.0
"\0": Vim(let):E859:
{"\0": 1}: Vim(let):E859:
:$put =string(l)
:let d=py3eval('{"a": "b", "c": 1, "d": ["e"]}')
:$put =sort(items(d))
+:let v:errmsg = ''
+:$put ='py3eval(\"None\") = ' . py3eval('None') . v:errmsg
:if has('float')
: let f=py3eval('0.0')
: $put =string(f)
['a', 'b']
['c', 1]
['d', ['e']]
+py3eval("None") = 0
0.0
"\0": Vim(let):E859:
{"\0": 1}: Vim(let):E859:
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1129,
/**/
1128,
/**/