diff options
author | Nick Coghlan <ncoghlan@gmail.com> | 2012-08-16 04:13:07 (GMT) |
---|---|---|
committer | Nick Coghlan <ncoghlan@gmail.com> | 2012-08-16 04:13:07 (GMT) |
commit | 573b1fd7794e01575736826300a6d3291818f2c4 (patch) | |
tree | 22b9aa8204a7ffd9b14c52733b61ebacc4cc34de /Objects | |
parent | 6f430e496339aea3e688165340456b555d5e1035 (diff) | |
download | cpython-573b1fd7794e01575736826300a6d3291818f2c4.zip cpython-573b1fd7794e01575736826300a6d3291818f2c4.tar.gz cpython-573b1fd7794e01575736826300a6d3291818f2c4.tar.bz2 |
Fix str docstring
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/unicodeobject.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index d5ef87f..b25b17b 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -9963,11 +9963,15 @@ unicode_subtype_new(PyTypeObject *type, PyObject *args, PyObject *kwds) } 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); |