summaryrefslogtreecommitdiffstats
path: root/Doc/glossary.rst
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2016-06-24 19:21:47 (GMT)
committerBrett Cannon <brett@python.org>2016-06-24 19:21:47 (GMT)
commitc28592bb2fbc294f404eab2ca29c2f35224af349 (patch)
treeb35830463d2a2155f348d441b4ac4df9187cd06d /Doc/glossary.rst
parentc78ca1e044b7ca4c1764bb3670196e72351d4467 (diff)
downloadcpython-c28592bb2fbc294f404eab2ca29c2f35224af349.zip
cpython-c28592bb2fbc294f404eab2ca29c2f35224af349.tar.gz
cpython-c28592bb2fbc294f404eab2ca29c2f35224af349.tar.bz2
Issue #27186: Define what a "path-like object" is.
Thanks to Dusty Phillips for the initial patch.
Diffstat (limited to 'Doc/glossary.rst')
-rw-r--r--Doc/glossary.rst10
1 files changed, 10 insertions, 0 deletions
diff --git a/Doc/glossary.rst b/Doc/glossary.rst
index 43af006..fe17595 100644
--- a/Doc/glossary.rst
+++ b/Doc/glossary.rst
@@ -778,6 +778,16 @@ Glossary
One of the default :term:`meta path finders <meta path finder>` which
searches an :term:`import path` for modules.
+ path-like object
+ An object representing a file system path. A path-like object is either
+ a :class:`str` or :class:`bytes` object representing a path, or an object
+ implementing the :class:`os.PathLike` protocol. An object that supports
+ the :class:`os.PathLike` protocol can be converted to a :class:`str` or
+ :class:`bytes` file system path by calling the :func:`os.fspath` function;
+ :func:`os.fsdecode` and :func:`os.fsencode` can be used to guarantee a
+ :class:`str` or :class:`bytes` result instead, respectively. Introduced
+ by :pep:`519`.
+
portion
A set of files in a single directory (possibly stored in a zip file)
that contribute to a namespace package, as defined in :pep:`420`.