summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorAndrew Kuchling <amk@amk.ca>2013-06-16 16:58:48 (GMT)
committerAndrew Kuchling <amk@amk.ca>2013-06-16 16:58:48 (GMT)
commitc7b6c50f29fac4971e7271ac649ee3b7ef3deac7 (patch)
tree84ce5a8e35e7d3da929f85c9f025beb2ddc05d7a /Modules
parent893f2ffc7c8a110f069bb05c66e60632cc49cbef (diff)
downloadcpython-c7b6c50f29fac4971e7271ac649ee3b7ef3deac7.zip
cpython-c7b6c50f29fac4971e7271ac649ee3b7ef3deac7.tar.gz
cpython-c7b6c50f29fac4971e7271ac649ee3b7ef3deac7.tar.bz2
Describe 'surrogateescape' in the documentation.
Also, improve some docstring descriptions of the 'errors' parameter. Closes #14015.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_io/_iomodule.c4
-rw-r--r--Modules/_io/textio.c5
2 files changed, 5 insertions, 4 deletions
diff --git a/Modules/_io/_iomodule.c b/Modules/_io/_iomodule.c
index b5cd176..4a7e758 100644
--- a/Modules/_io/_iomodule.c
+++ b/Modules/_io/_iomodule.c
@@ -168,8 +168,8 @@ PyDoc_STRVAR(open_doc,
"'strict' to raise a ValueError exception if there is an encoding error\n"
"(the default of None has the same effect), or pass 'ignore' to ignore\n"
"errors. (Note that ignoring encoding errors can lead to data loss.)\n"
-"See the documentation for codecs.register for a list of the permitted\n"
-"encoding error strings.\n"
+"See the documentation for codecs.register or run 'help(codecs.Codec)'\n"
+"for a list of the permitted encoding error strings.\n"
"\n"
"newline controls how universal newlines works (it only applies to text\n"
"mode). It can be None, '', '\\n', '\\r', and '\\r\\n'. It works as\n"
diff --git a/Modules/_io/textio.c b/Modules/_io/textio.c
index cff9c6e..cd751c1 100644
--- a/Modules/_io/textio.c
+++ b/Modules/_io/textio.c
@@ -642,8 +642,9 @@ PyDoc_STRVAR(textiowrapper_doc,
"encoding gives the name of the encoding that the stream will be\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"
+ "errors determines the strictness of encoding and decoding (see\n"
+ "help(codecs.Codec) or the documentation for codecs.register) and\n"
+ "defaults to \"strict\".\n"
"\n"
"newline controls how line endings are handled. It can be None, '',\n"
"'\\n', '\\r', and '\\r\\n'. It works as follows:\n"