summaryrefslogtreecommitdiff
path: root/Modules/_io/textio.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_io/textio.c')
-rw-r--r--Modules/_io/textio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_io/textio.c b/Modules/_io/textio.c
index ae105e53cc..287f165cb0 100644
--- a/Modules/_io/textio.c
+++ b/Modules/_io/textio.c
@@ -630,7 +630,7 @@ PyDoc_STRVAR(textiowrapper_doc,
"Character and line based layer over a BufferedIOBase object, buffer.\n"
"\n"
"encoding gives the name of the encoding that the stream will be\n"
- "decoded or encoded with. It defaults to locale.getpreferredencoding.\n"
+ "decoded or encoded with. It defaults to locale.getpreferredencoding(False).\n"
"\n"
"errors determines the strictness of encoding and decoding (see the\n"
"codecs.register) and defaults to \"strict\".\n"
@@ -898,7 +898,7 @@ textiowrapper_init(textio *self, PyObject *args, PyObject *kwds)
else {
use_locale:
self->encoding = _PyObject_CallMethodId(
- state->locale_module, &PyId_getpreferredencoding, NULL);
+ state->locale_module, &PyId_getpreferredencoding, "O", Py_False);
if (self->encoding == NULL) {
catch_ImportError:
/*