File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -97,15 +97,17 @@ the :mod:`glob` module.)
9797
9898.. function :: commonprefix(list, /)
9999
100- Return the longest path prefix (taken character-by-character) that is a
101- prefix of all paths in *list *. If *list * is empty, return the empty string
100+ Return the longest string prefix (taken character-by-character) that is a
101+ prefix of all strings in *list *. If *list * is empty, return the empty string
102102 (``'' ``).
103103
104- .. note ::
104+ .. warning ::
105105
106106 This function may return invalid paths because it works a
107- character at a time. To obtain a valid path, see
108- :func: `commonpath `.
107+ character at a time.
108+ If you need a **common path prefix **, then the algorithm
109+ implemented in this function is not secure. Use
110+ :func: `commonpath ` for finding a common path prefix.
109111
110112 ::
111113
You can’t perform that action at this time.
0 commit comments