summaryrefslogtreecommitdiff
path: root/src/if_python3.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-04-21 20:00:56 +0200
committerBram Moolenaar <Bram@vim.org>2016-04-21 20:00:56 +0200
commit6d4431e7b675ba7a0194c0b8eb84b7d92e4e7953 (patch)
treeff1a1467afecfc2a5a630e20cf3b0756834519f3 /src/if_python3.c
parentd106e5ba7f10f0d2a14eaefe5d78405044416cb9 (diff)
downloadvim-git-6d4431e7b675ba7a0194c0b8eb84b7d92e4e7953.tar.gz
patch 7.4.1769v7.4.1769
Problem: No "closed", "errors" and "encoding" attribute on Python output. Solution: Add attributes and more tests. (Roland Puntaier, closes #622)
Diffstat (limited to 'src/if_python3.c')
-rw-r--r--src/if_python3.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/if_python3.c b/src/if_python3.c
index d2f6066cb..10984cdfe 100644
--- a/src/if_python3.c
+++ b/src/if_python3.c
@@ -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);
}