1
0
forked from aniani/vim

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

@@ -1100,6 +1100,10 @@ OutputGetattro(PyObject *self, PyObject *nameobj)
if (strcmp(name, "softspace") == 0)
return PyLong_FromLong(((OutputObject *)(self))->softspace);
else if (strcmp(name, "errors") == 0)
return PyString_FromString("strict");
else if (strcmp(name, "encoding") == 0)
return PyString_FromString(ENC_OPT);
return PyObject_GenericGetAttr(self, nameobj);
}