diff options
author | Brett Cannon <brett@python.org> | 2016-09-06 22:50:29 (GMT) |
---|---|---|
committer | Brett Cannon <brett@python.org> | 2016-09-06 22:50:29 (GMT) |
commit | ec6ce879c7d55d3905240a855444ac83e08c6583 (patch) | |
tree | 6658bf68003b9858f50e92713876b23cb6657463 /Doc/c-api/unicode.rst | |
parent | dc5a3fe4efee222dd8512fd63d9445ae5de42fc1 (diff) | |
download | cpython-ec6ce879c7d55d3905240a855444ac83e08c6583.zip cpython-ec6ce879c7d55d3905240a855444ac83e08c6583.tar.gz cpython-ec6ce879c7d55d3905240a855444ac83e08c6583.tar.bz2 |
Issue #26027: Support path-like objects in PyUnicode-FSConverter().
This is to add support for os.exec*() and os.spawn*() functions. Part
of PEP 519.
Diffstat (limited to 'Doc/c-api/unicode.rst')
-rw-r--r-- | Doc/c-api/unicode.rst | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Doc/c-api/unicode.rst b/Doc/c-api/unicode.rst index 5383e97..019453f 100644 --- a/Doc/c-api/unicode.rst +++ b/Doc/c-api/unicode.rst @@ -810,13 +810,16 @@ used, passing :c:func:`PyUnicode_FSConverter` as the conversion function: .. c:function:: int PyUnicode_FSConverter(PyObject* obj, void* result) - ParseTuple converter: encode :class:`str` objects to :class:`bytes` using + ParseTuple converter: encode :class:`str` objects -- obtained directly or + through the :class:`os.PathLike` interface -- to :class:`bytes` using :c:func:`PyUnicode_EncodeFSDefault`; :class:`bytes` objects are output as-is. *result* must be a :c:type:`PyBytesObject*` which must be released when it is no longer used. .. versionadded:: 3.1 + .. versionchanged:: 3.6 + Accepts a :term:`path-like object`. To decode file names during argument parsing, the ``"O&"`` converter should be used, passing :c:func:`PyUnicode_FSDecoder` as the conversion function: |