File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -97,12 +97,15 @@ 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+ .. danger ::
105105
106+ If you need a **common path prefix **, then the algorithm
107+ implemented in this function is not secure. Use
108+ :func: `commonpath ` for finding a common path prefix.
106109 This function may return invalid paths because it works a
107110 character at a time. To obtain a valid path, see
108111 :func: `commonpath `.
You can’t perform that action at this time.
0 commit comments