summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorSebastian Rittau <srittau@rittau.biz>2024-02-18 08:24:58 (GMT)
committerGitHub <noreply@github.com>2024-02-18 08:24:58 (GMT)
commit371c9708863c23ddc716085198ab07fa49968166 (patch)
tree305ca06fc4fa5d87a8ff08e2a01dc3eba0a2d802 /Doc
parentf9154f8f237e31e7c30f8698f980bee5e494f1e0 (diff)
downloadcpython-371c9708863c23ddc716085198ab07fa49968166.zip
cpython-371c9708863c23ddc716085198ab07fa49968166.tar.gz
cpython-371c9708863c23ddc716085198ab07fa49968166.tar.bz2
gh-114709: Fix exceptions raised by posixpath.commonpath (#114710)
Fix the exceptions raised by posixpath.commonpath Raise ValueError, not IndexError when passed an empty iterable. Raise TypeError, not ValueError when passed None.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/os.path.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/library/os.path.rst b/Doc/library/os.path.rst
index 34bc76b..16e654f 100644
--- a/Doc/library/os.path.rst
+++ b/Doc/library/os.path.rst
@@ -79,7 +79,7 @@ the :mod:`glob` module.)
.. function:: commonpath(paths)
- Return the longest common sub-path of each pathname in the sequence
+ Return the longest common sub-path of each pathname in the iterable
*paths*. Raise :exc:`ValueError` if *paths* contain both absolute
and relative pathnames, the *paths* are on the different drives or
if *paths* is empty. Unlike :func:`commonprefix`, this returns a
@@ -90,7 +90,7 @@ the :mod:`glob` module.)
.. versionadded:: 3.5
.. versionchanged:: 3.6
- Accepts a sequence of :term:`path-like objects <path-like object>`.
+ Accepts an iterable of :term:`path-like objects <path-like object>`.
.. function:: commonprefix(list)