summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorNick Coghlan <ncoghlan@gmail.com>2012-08-16 04:14:30 (GMT)
committerNick Coghlan <ncoghlan@gmail.com>2012-08-16 04:14:30 (GMT)
commit0e41628d3583c03a6078d88c91a4ac80482f060b (patch)
treef7923025037f64f1e6eb78102e2a2de3bd6fff0f /Objects
parent721738fbee8d75dab5a5d3c4f3dbd7c72d76925e (diff)
parent573b1fd7794e01575736826300a6d3291818f2c4 (diff)
downloadcpython-0e41628d3583c03a6078d88c91a4ac80482f060b.zip
cpython-0e41628d3583c03a6078d88c91a4ac80482f060b.tar.gz
cpython-0e41628d3583c03a6078d88c91a4ac80482f060b.tar.bz2
Merge str docstring fix from 3.2
Diffstat (limited to 'Objects')
-rw-r--r--Objects/unicodeobject.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 3e3abfc..d369861 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -14083,11 +14083,15 @@ onError:
}
PyDoc_STRVAR(unicode_doc,
- "str(string[, encoding[, errors]]) -> str\n\
+ "str(object[, encoding[, errors]]) -> str\n\
\n\
-Create a new string object from the given encoded string.\n\
-encoding defaults to the current default string encoding.\n\
-errors can be 'strict', 'replace' or 'ignore' and defaults to 'strict'.");
+Create a new string object from the given object. If encoding or\n\
+errors is specified, then the object must expose a data buffer\n\
+that will be decoded using the given encoding and error handler.\n\
+Otherwise, returns the result of object.__str__() (if defined)\n\
+or repr(object).\n\
+encoding defaults to sys.getdefaultencoding().\n\
+errors defaults to 'strict'.");
static PyObject *unicode_iter(PyObject *seq);