[Python-checkins] cpython: Clarify documentation for os.fspath().
brett.cannon
python-checkins at python.org
Thu Jun 9 17:32:21 EDT 2016
https://hg.python.org/cpython/rev/ec0c6a4e617c
changeset: 101826:ec0c6a4e617c
user: Brett Cannon <brett at python.org>
date: Thu Jun 09 14:32:08 2016 -0700
summary:
Clarify documentation for os.fspath().
files:
Modules/clinic/posixmodule.c.h | 8 ++++----
Modules/posixmodule.c | 8 ++++----
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/Modules/clinic/posixmodule.c.h b/Modules/clinic/posixmodule.c.h
--- a/Modules/clinic/posixmodule.c.h
+++ b/Modules/clinic/posixmodule.c.h
@@ -5486,9 +5486,9 @@
"\n"
"Return the file system path representation of the object.\n"
"\n"
-"If the object is str or bytes, then allow it to pass through with\n"
-"an incremented refcount. If the object defines __fspath__(), then\n"
-"return the result of that method. All other types raise a TypeError.");
+"If the object is str or bytes, then allow it to pass through as-is. If the\n"
+"object defines __fspath__(), then return the result of that method. All other\n"
+"types raise a TypeError.");
#define OS_FSPATH_METHODDEF \
{"fspath", (PyCFunction)os_fspath, METH_VARARGS|METH_KEYWORDS, os_fspath__doc__},
@@ -5984,4 +5984,4 @@
#ifndef OS_SET_HANDLE_INHERITABLE_METHODDEF
#define OS_SET_HANDLE_INHERITABLE_METHODDEF
#endif /* !defined(OS_SET_HANDLE_INHERITABLE_METHODDEF) */
-/*[clinic end generated code: output=31dd4f672c8a6f8c input=a9049054013a1b77]*/
+/*[clinic end generated code: output=1b91c3a100e75a4d input=a9049054013a1b77]*/
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -12323,14 +12323,14 @@
Return the file system path representation of the object.
-If the object is str or bytes, then allow it to pass through with
-an incremented refcount. If the object defines __fspath__(), then
-return the result of that method. All other types raise a TypeError.
+If the object is str or bytes, then allow it to pass through as-is. If the
+object defines __fspath__(), then return the result of that method. All other
+types raise a TypeError.
[clinic start generated code]*/
static PyObject *
os_fspath_impl(PyModuleDef *module, PyObject *path)
-/*[clinic end generated code: output=51ef0c2772c1932a input=652c7c37e4be1c13]*/
+/*[clinic end generated code: output=51ef0c2772c1932a input=e357165f7b22490f]*/
{
return PyOS_FSPath(path);
}
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list