0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 7.4.1769

Problem:    No "closed", "errors" and "encoding" attribute on Python output.
Solution:   Add attributes and more tests. (Roland Puntaier, closes #622)
This commit is contained in:
Bram Moolenaar
2016-04-21 20:00:56 +02:00
parent d106e5ba7f
commit 6d4431e7b6
8 changed files with 33 additions and 3 deletions

View File

@@ -1195,7 +1195,10 @@ OutputGetattr(PyObject *self, char *name)
return PyInt_FromLong(((OutputObject *)(self))->softspace);
else if (strcmp(name, "__members__") == 0)
return ObjectDir(NULL, OutputAttrs);
else if (strcmp(name, "errors") == 0)
return PyString_FromString("strict");
else if (strcmp(name, "encoding") == 0)
return PyString_FromString(ENC_OPT);
return Py_FindMethod(OutputMethods, self, name);
}